September 25, 2022, 12:18:42 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Toggle Category Headers

Pages: [1]   Go Down
  Print  
Author Topic: Toggle Category Headers  (Read 387 times)
Vitality
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 154



View Profile
Badges: (View All)
« on: November 12, 2008, 09:25:00 pm »

It does what the title says. If you click on the header of a category, it will collapse, and if you click it again, it will expand. I don't know how many browsers it will work in, I know it works in FF though. It's just something I whipped up very, very quickly.
Code:
<script>
/*Toggle Category Headers By Vitality of TCZ || Revolution X*/
$(".catbg").click(function (){$(this).next().toggle();});
</script>
Report Spam   Logged


CODE

Share on Facebook Share on Twitter

Spoken
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 454



View Profile
Badges: (View All)
« Reply #1 on: November 12, 2008, 09:55:49 pm »

The only problwm with this code is, when you click on the category name, it toggles it, then refreshes the page. Because the URL that is linked to the category name is the site home.
Report Spam   Logged

Spoken
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 454



View Profile
Badges: (View All)
« Reply #2 on: November 12, 2008, 10:01:28 pm »

Nevermind. If you just click the catbg image it toggles it XD
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #3 on: June 22, 2009, 04:13:11 am »

Spoken, That doesn't happen with me.
It works fine on my Forum
Report Spam   Logged






Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy