[jQuery] Re: Help with show hide function

2009-08-23 Thread Charlie
You can streamline your methods a lot by thinking about  classes first before thinking about ID's. SOme simple addition of classes to this code will allow consolidating everything into one fairly simple function your code:  $('#home').click(function() {       $('#who>a').removeClass('selecte

[jQuery] Re: Help with show hide function

2009-08-22 Thread Jacques Choquette - WhistlerGraphicDesign.com
This is what I ending up going with I seriously doubt this is the most efficient / proper way to do this this but it's working anyways $(document).ready(function() { // hides the all tabs as soon as the DOM is ready // (a little sooner than page load) $('#homeTab').hide(); $('#whoTa

[jQuery] Re: Help with show hide function

2009-08-22 Thread 262Rui
If your divs are named #workdiv , #whatdiv, etc I would try something like: $('#work').click(function() { $('#workTab').toggle(400); return false; $("div[id!=workdiv]").hide(); $('#workdiv').show(); }); Good luck