Quick JQuery help

Associate
Joined
11 Mar 2007
Posts
1,741
Evening all, hoping one of you could help me out.

On a wordpress template I'm designing I've got it so the News page shows a list of news headings and when clicked upon it revels the whole article in a drop down box with JQuery, (except the first article which is open when the page loads). I've managed to get this far, but what i'd like now is so that when you click on another heading the previous article closes, which I have no idea how to achieve.

html looks roughly like so:

Code:
<post>

<h3><a></a></h3>

<entry-summary></entry-summary>

<date></date>

</post>

--- Repeat -----


Current JQuery
Code:
<script type="text/javascript">
$(document).ready(function(){
$(".entry-summary:not(:first)").hide();
$("h3 a").click(function(){

$(this).parent("h3.entry-title").next().slideToggle("400");


return false;
});
});


</script>

Thanks.
 
that is fantastic, thankyou very much.

I'm slowly trying learn more JQuery as incorporate it into sites more, i'm more of a php guy though.
 
Back
Top Bottom