Skip to content
Advertisement

Tag: jquery-events

How to fire an event on class change using jQuery?

I would like to have something like: Answer There is no event raised when a class changes. The alternative is to manually raise an event when you programatically change the class: UPDATE – 2015 This question seems to be gathering some visitors, so here is an update with an approach which can be used without having to modify existing code

Fire onblur event before onchange event

I have a large form that contains several text input fields. Essentially, I need to handle the onchange event for all fields and the onblur events for some fields. When a change is made to a field and the field loses focus, both events fire (which is the correct behavior). The only issue is that I would like to handle

Prevent click event after drag in jQuery

I have a draggable <div> with a click event and without any event for drag, but after I drag <div> the click event is apply to <div>. How can prevent of click event after drag? http://jsfiddle.net/prince4prodigy/aG72R/ Answer I made a solution with data and setTimeout. Maybe better than helper classes. and Check the fiddle.

Having trouble getting bound events to fire

I have included the below code in the header of my page: I have tested it by putting my mouse into the text field with this ID and removing it, clicking outside of it but nothing fires. I checked the error console and there is nothing, so it looks like it’s not even attempting to fire it. http://jsfiddle.net/kRaJy/ What am

jQuery $(event.target) returns DOM in console, not HTML

With this code: I expect to see: but instead get: [span.icon-tag docs-tag child_hover dropdown-open, context: span.icon-tag docs-tag child_hover dropdown-open, constructor: function, init: function, selector: “”, jquery: “1.8.2”…] I have recently upgraded to jQuery 1.8.2. Has there been a change in how $(event.target) is handled? Answer This has to do with changes in the browser output, it doesn’t have to do

Prevent, then re-trigger a JavaScript event?

I’ve got an event handler set on document, listening for submit and change events, delegated to any form elements on the page. The idea is to update the server when an input is altered (since the event bubbles up to the form), while also allowing for submitting an entire form. I have a few overrides in place for inputs that

Handling several .one on same event and element

I have a custom animation framework that uses CSS transitions. In order to allow for callbacks I attach: However, some of the same event listeners are fired again and again (yes, it’s actually the same functions with the same guids, I checked). It seems the .one is not properly removing it again. I’ve tried making a small test-fix with a:

Advertisement