-1 |
|
function init(slickbox, showlink, hidelink, togglelink) {
// hides the slickbox as soon as the DOM is ready
$('#'+slickbox).hide();
// shows the slickbox on clicking the noted link
$('#'+showlink).click(function() {
$('#'+slickbox).show('slow');
return false;
});
// hides the slickbox on clicking the noted link
$('#'+hidelink).click(function() {
$('#'+slickbox).hide('fast');
return false;
});
// toggles the slickbox on clicking the noted link
$('#'+togglelink).click(function() {
$('#'+slickbox).toggle(400);
return false;
});
}
$(document).ready(function() {
init("slickbox", "slick-show", "slick-hide", "slick-toggle");
});
function init(slickbox, showlink, hidelink, togglelink) { // hides the slickbox as soon as the DOM is ready $('#'+slickbox).hide(); // shows the slickbox on clicking the noted link $('#'+showlink).click(function() { $('#'+slickbox).show('slow'); return false; }); // hides the slickbox on clicking the noted link $('#'+hidelink).click(function() { $('#'+slickbox).hide('fast'); return false; }); // toggles the slickbox on clicking the noted link $('#'+togglelink).click(function() { $('#'+slickbox).toggle(400); return false; }); } $(document).ready(function() { init("slickbox", "slick-show", "slick-hide", "slick-toggle"); });
|