I have a div that displays or hides dynamically. I want some function to be executed when the div is shown for the first time. Let me know how to do this.
<div id="firstDiv"></div> <div id="secondDiv"></div>
so when $('#secondDiv").show(); I want to perform some function.
$('#secondDiv").show();
How can i do this?
You can provide a function callback function showthat will be executed upon completion show:
show
$("#secondDiv").show(function() { //Do something });
, . , show (.. ), 0 show. .