I was trying to add function2 in my jquery hide method.I can do it through the code which is commented.So,can anyone please rectify my code.I want to call function2 from callback parameter of hide method.
<script>
// $(document).ready(function () {
// $("#p1").click(function () {
// $("#p2").hide("slow", function () {
// alert("para2 is now hidden");
// });
// });
// });
$(document).ready(function () {
$("#p1").click(function () {
$("#p2").hide("slow", function(){
function2();
});
});
function function2() {
alert("para2 is now hidden");
}
</script>