Reputation: 115
I am using the jQuery resizable plugin to allow users to resize an embedded video. The video is a child of a div which is getting resized. Here is a fiddle of the basics http://jsfiddle.net/jrzNW/1/.
It works fine until the mouse hovers over the the video itself and then the resizing stops until the mouse moves off the video. I tried setting a div to show()
when the click event begins but that created more problems then solutions. If someone could point me in the right direction I would appreciate it.
Upvotes: 2
Views: 8666
Reputation: 2592
Well, have you tried something like this?
$('#video').on('mouseover', function() { return false; });
That should abort any other things registered for that event. See .on()
Returning false from an event handler will automatically call
event.stopPropagation()
andevent.preventDefault()
. A false value can also be passed for the handler as a shorthand forfunction(){ return false; }
. So,$("a.disabled").on("click", false);
attaches an event handler to all links with class "disabled" that prevents them from being followed when they are clicked and also stops the event from bubbling.
Upvotes: 2