This code switches the visibility of frm01
$(document).ready(function () {
$("#reg").click(function () {
if ($("#frm01").is(":visible")) $("#frm01").hide("slide", {
direction: "down"
}, 1000);
else $("#frm01").show("slide", {
direction: "down"
}, 1000);
});
});
But underlying div (div bellow frm01) is moved up/down momentarily, without slide effect.
I want to move it also using slide effect.
If it is a separate div, why not simply add that div to the jquery selector as well?
Or, if you just want to animate the movement of the div, use the jquery .animate() function.
More on animating CSS changes here