I have a page with some iframes. I can't control the content on the actual content of the iframe, but I want to link it to another page. Let's say this way: When I click anywhere inside the iframe, I want to be redirected to eg. google.com. Generally the whole iframe is a button.
I believe this can be done using js.
<section id="menu">
<iframe id="button1" src="http://content.captive-portal.com/buttons/w8/mode/free-sms/button.html" target="_top" frameset frameborder=0 scrolling="no"></iframe>
<iframe id="button1" src="http://content.captive-portal.com/buttons/w8/mode/knights-and-dragons/button.html" target="_top" frameset frameborder=0 scrolling="no"></iframe>
</section>
function () {
$("#button1").on('click', function(){
window.location = "http://www.google.com/";
});
$("#button2").on('click', function(){
window.location = "http://www.apple.com/";
});
};
example here:jsfiddle.net/tucado/t5Ca2/1