I’ve already created my divs in Jquery, but i would like to wrap them all in a div, to work with slideToggle. But i don’t see how i can do that, could you please help me?
here’s my code :
var $container = $('...(bug)div class="container">')
.hide()
.appendTo($monid)
.fadeIn('slow')
.before('..(bug)div class="up">')
.after('..(bug)div class="down">');
and i would like to wrap the divs : “up, down, container” to a new div. Do you have any solution?
Thanks
You can use wrapall.
http://api.jquery.com/wrapAll/
Something like this:
$(".up, .down, .container").wrapAll("<div/>")