How do i call a JQuery plugin function from within an iframe?
(function($){
$.fn.jqueryEx = function() {
function CallThisFunctionFromIframe(){
}
}
})(jQuery);
The iframe is on the same domain as parent document.
(function($){
$.fn.jqueryEx = function() {
$.fn.jqueryEx .CallThisFunctionFromIframe= function() {
alert('hello');
}
}
})(jQuery);
Call this from within the iframe
$(document).ready(function() {
window.parent.$.fn.jqueryEx.CallThisFunctionFromIframe();
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With