jnoweb jnoweb - 10 months ago 53
Javascript Question

Show a div once you onclick and continue to show until clicked again

I currently have a hover state applied to #ex:

$("#ex").hover(function(event) {
}, function() {

However, I also want to have an onclick state applied to #prod, which continues to show, but at the moment it doesn't because of the line I've coded above:


Any ideas???

Answer Source

Use stop() method to stop the animation.


Or as @freedomn-m suggested - finish() method can be used.