I am using function to jQuery .load()
. I want to execute function(testFnc)
of after page. This function is onclick event.
And I want using variable of b.aspx.
This is the code:
//a.aspx page code
$('#divArea').load('b.aspx');
//b.aaspx page code
function testFnc() {
//code
}
...
edit code :
//a.aspx page code
$('#divArea').load('b.aspx');
//b.aaspx page code
function testFnc(param) {
//code
}
...
<span onclick='testFnc(params);'>button</span>
Use the callback for on load()
method. Callback function executed when load load()
execution completes.
<span id="loadb">button</span>
$("#loadb").on('click', function(){
$('#mydiv').load('b.aspx', function() {
// This gets executed when the content is loaded
testFnc()
});
function testFnc() {
//code
}
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments