Change Iframe Source From Link Href
I need to change iframe source from url. http://jsfiddle.net/YkKu3/ My HTML: this Image
Solution 2:
You have the order of events mixed up. Correct code that will load the anchor URL into the iframe:
$(window).load(function() {
$('button').click( function(event) {
var clicked = $(this);
window.setTimeout(function() {
$("#frameimg").attr("src", $(".gotothis").attr("href"));
}, 1000);
});
});
Copy
Live test case. (With a cute cat :))
Post a Comment for "Change Iframe Source From Link Href"