Searhed a bit and couldn’t find it.
I’m sitting with a issue here.
on http://cmctest.netserver11.net, i have 6 images wich has a toggle jquery function.
Problem is, that when i, toggle twice, the other one dissapears.
I tried the jquery hide function but it was regardless.
Only thing i need for this is, when you toggle the second, the first one will collapse.
jQuery(document).ready(function() {
jQuery(".content").hide();
//toggle the componenet with class msg_body
jQuery(".heading").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
});
Would be awesome if you could help!
Thanx
You just need to hide all before slide down
There is no need to use
slideToggle()for what you want to acomplish, don’t “ask” the user to click again to hide the text…by the way… you should use a
<ul>instead a bunch of<div>‘s for your markup, something like:then you can easily do:
I just forgot one little detail!
inside the click method, replace what you have with: