Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • Filter Options On Click
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Add Reply
Filter Options On Click
Topic Started: Jul 4 2009, 01:21 AM (191 Views)
Jason Jul 4 2009, 01:21 AM Post #1
Member Avatar


Posts:
6
Group:
Member
Member
#760
Joined:
Aug 28, 2008
Coding language
JavaScript
This is a very simple and small code, it hides the topic filter options until a user expands them on a click.

Example before click:
Posted Image

After Click:
Posted Image

Grab The Code > Put In Board Template > Below Board

Code:
 
<script type="text/javascript">
$(function(){
$('.c_sort .right').css({'display' : 'none'});
$('.c_sort').append('<div class="show"><b>Click for filter options</b></div>');
$('.c_sort .show').click(function(){
$(this).hide('fast');
$('.c_sort .right').show('slow');
});
});
</script>



Add The Following To The Bottom of your CSS style sheets:

Code:
 
/* Sort Mod */
.c_sort .show {
cursor: pointer;
float: right
}

Edited by Jason, Jul 4 2009, 10:14 AM.
Offline Profile Quote Post Goto Top
 
Viral Jul 4 2009, 10:09 AM Post #2


Posts:
341
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
Looks quite good, but you may want to hide the .c_sort stuff using JavaScript, not CSS. Therefore if the user has JS disabled he/she will still see the original filter options.

Posted Image
Offline Profile Quote Post Goto Top
 
Jason Jul 4 2009, 10:14 AM Post #3
Member Avatar


Posts:
6
Group:
Member
Member
#760
Joined:
Aug 28, 2008
Coding language
JavaScript
Good idea thanks, I fixed it up like that :)
Offline Profile Quote Post Goto Top
 
OverDrive Jul 5 2009, 04:58 PM Post #4


Posts:
12
Group:
Member
Member
#3,013
Joined:
May 18, 2009
Coding language
None
Nice work jason.
Offline Profile Quote Post Goto Top
 
IncomingGank Nov 13 2009, 06:18 AM Post #5
Member Avatar


Posts:
275
Group:
Dedicated
Member
#3,556
Joined:
Nov 5, 2009
Coding language
None
What are topic filter options ?
Posted Image
Offline Profile Quote Post Goto Top
 
xojycyjox Nov 19 2009, 10:52 PM Post #6


Posts:
4
Group:
Member
Member
#2,889
Joined:
Apr 28, 2009
Ryu.
Nov 13 2009, 06:18 AM
What are topic filter options ?
they're the options that appear towards the bottom of the page when you're viewing a thread on Zetaboards. Where you choose what kinds of topics you're looking for. He has a picture up of what it looks like.
Posted Image

That's what this code is hiding.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Zetaboards Modifications · Next Topic »
Add Reply

Track Topic · E-mail Topic Time: 3:41 PM Sep 3
Hosted for free by ZetaBoards