Dynamic variables
Dynamic variables
Hi,
I am using this slickbox code, but wwant to use it for multiple divs with different variables.
-
<p><a href="#" id="slick-toggle">Toggle the box</a></p>
<div id="slickbox">This is the box that will be shown and hidden and toggled at your whim. :)</div>
So I will have slickbox_1, slickbox_2, etc. How can I modify the script below to accept all these different div names?
Here is the javascript:
-
$(document).ready(function() {
$('#slickbox').hide();
// toggles the slickbox on clicking the noted link
$('a#slick-toggle').click(function() {
$('#slickbox').toggle(400);
return false;
});
});
Any and all help most appreciated from a complete jquery newbie.
Thanks