Monday, 19 August 2013

Disable click Youtube iframe

Disable click Youtube iframe

I need to disable click of the Youtube iframe or set difference click.
I tried to put a div in front the iframe but it doesn't work.
Here is my code:
$(".youtube").each(function () {
var div = this;
var offset = $(this).offset();
var x = offset.left;
var y = offset.top;
var height = $(this).height();
var width = $(this).width();
var divInFront = '<div style="position:absolute; height:' + height +
'; width:' + width + '; top:' + y + '; left:' + x + ';" ></div>';
$("body").append(divInFront);
});

No comments:

Post a Comment