My script loads an iframe when the user clicks a button. I want to call another function after the iframe loads, but it\'s not working. The iframe does load normally, but
Try this:
$("").appendTo("body") .attr('src', url) .load(function() { callback(this); });
Just added some chaining, created the element where the selector usually goes (this is possible), and appended it to the body.