Response title
This is preview!
<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>
$(document).ready(function() {
$('#slickbox').hide();
// toggles the slickbox on clicking the noted link
$('a#slick-toggle').click(function() {
$('#slickbox').toggle(400);
return false;
});
});
<script>
$(document).ready(function() {
$('#slickbox').hide();
$('a#slick-toggle').click(function() {
var newHref = $(this).attr("href");
$('#slickbox_' + newHref).toggle(400);
return false;
});
});
</script>
</head>
<body>
<a href="1" id="slick-toggle">Toggle the box</a></p>
<div id="slickbox_1">This is the box that will be shown and hidden and toggled at your whim. :)</div>
<a href="2" id="slick-toggle">Toggle the box</a></p>
<div id="slickbox_2">This is the box that will be shown and hidden and toggled at your whim. :)</div>
© 2013 jQuery Foundation
Sponsored by and others.