[jQuery] Re: showing / hiding divs based on location hash, proposed solution

2007-10-23 Thread stef
amazing ... On Oct 22, 9:45 pm, [EMAIL PROTECTED] wrote: Well, it could be shorter :) $(function(){ $('#aboutContent div').not(location.hash).hide(); }); Danny On Oct 22, 9:40 am, stef [EMAIL PROTECTED] wrote: i previously asked about a way to hide and show divs based on the

[jQuery] Re: showing / hiding divs based on location hash, proposed solution

2007-10-22 Thread d . wachss
That seems like a lot of work. Why not $(function(){ /* shorthand for $(document).ready(function(){ */ $('#aboutContent div').hide(); /* hide all div's */ $(location.hash).show(); /* the hash (with the # sign) is the same as the CSS selector for an ID (that's why it was chosen) */ } To

[jQuery] Re: showing / hiding divs based on location hash, proposed solution

2007-10-22 Thread d . wachss
Well, it could be shorter :) $(function(){ $('#aboutContent div').not(location.hash).hide(); }); Danny On Oct 22, 9:40 am, stef [EMAIL PROTECTED] wrote: i previously asked about a way to hide and show divs based on the location hash value. so if the url is domain.com/page.php#contact then