Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Want to show a Div on specific time for a specific duration

I setted up the jwplayer on an html page.
I would like to Show a div when the video is at 10 sec and untill it reaches 50 sec.

i try

jwplayer('video_background').onTime(function(){ var position = jwplayer('video_background').getPosition(20);
if (position >=20) {
document.getElementById('slide') (function {
( == 'none' || = '')
? = 'block'
: = 'none';
}, false);

what am i doing wrong?

3 Community Answers


JW Player Support Agent  
0 rated :

You can do something a bit more simple like:
var position = event.position;
if (position >=10 && position <=50) {
//Show your div
} else {
//Don’t show your div


0 rated :

tryied...i got the message...

"undefined in not a function...



JW Player Support Agent  
0 rated :

Are you listing the correct player div here? Also, the desk formatting may have changed the quotes I’ve used to styled quotes. Please make sure to check for those as well and use normal quotes instead.

This question has received the maximum number of answers.