i have a video player and i need to detect when the scrubber is more then 20.6% across this is the script i got so far
function ad()
{
if (document.getElementById('scrubber').style.left > "20.6%")
{
document.getElementById('ad').style.display = 'block'
}else{
setTimeout(ad(),1000);
}
}
this is the scrubber and the ad i need to show when the scrubber is past 20.6%
<a id="scrubber" href="#" class="scrubber-button" style="left: 0%;"><img src="scrubber.gif" width="16" height="16"></a>
<div id="ad" class="ad" style="display:none;">Ad This is the ad if you see this then i win.</div>