I’m using jquery kwicks for a projects and on document ready I provide the following functions.
an initial function of what the kwicks should do on document ready function which is my whatToDo
var whatToDo = 'mouseover';
$('.kwicks').kwicks({
min : 10,
max : 480,
duration: 800,
easing: 'easeOutQuint',
sticky : true,
defaultKwick : 3,
event : whatToDo,
});
Next what I want to do is basically when a user clicks and item for instance a certain div or p to switch from ‘mouseover’ to ‘click’
I have tried the following but does not seem to work.
$('#video').click(function(){
var whatToDo = 'click';
});
any suggestions?
Sorry if my comment made it sound like it was impossible… all you need to do is set up a custom event (demo):
HTML
Script
To answer your updated needs, you will need to have a variable that is set by the jwplayer event functions. I haven’t tested the code below, but it should work. If it has any problems, then maybe try moving the
jwplayingvariable outside the$(document).readyto make it a global variable.On and btw, I added
documentinside the$().readyas it is not recommended by the jQuery team to use that syntax and it may be phased out in future versions.