[jQuery] Re: Passing variable to simple show/hide function

2007-06-22 Thread Ganeshji Marwaha
will you be able to add a class attribute to all the category divs that you have. For example: Post Title Post content Categories Example categories listed here If you can then, try this $(document).ready(function() { $(".cat").hide(); $("h2")

[jQuery] Re: Passing variable to simple show/hide function

2007-06-22 Thread alistair
Very nice - that worked great. Next question: how do I get all the category DIVs to be hidden by default? A. On Jun 22, 10:47 am, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote: > Try the following script. It should be placed after the script tag where u > import jquery library. > This should so

[jQuery] Re: Passing variable to simple show/hide function

2007-06-22 Thread Ganeshji Marwaha
Try the following script. It should be placed after the script tag where u import jquery library. This should solve your problem. Lemme know. $(document).ready(function() { $("h2").click(function(){ $(this).next("div").toggle(); return false;

[jQuery] Re: Passing variable to simple show/hide function

2007-06-22 Thread alistair
I'm not sure that it matters what the tool is, it could be blogger, or wordpress or anything else. The bottom line is that multiple posts on the same page each have a categories section that I would like to show if the user clicks on the Categories headline. The problem is that a normal show/hid

[jQuery] Re: Passing variable to simple show/hide function

2007-06-21 Thread Ganeshji Marwaha
I am not familiar with wordpress... So, it will be helpful if you could post the HTML structure that you have and also the details of what should happen on click of what.. -GTG On 6/21/07, alistair <[EMAIL PROTECTED]> wrote: I'm a jQuery newb and I'm playing with a wordpress theme. What I'd