954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

javascript detect

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>
drabsch
Light Poster
36 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: