jquery-events

JQuery: how do I see which events are defined on an element?

I use $(window).bind( ... ) to set up event handlers, but for some reason I keep losing event handlers (i think). Is there any way when debugging (firebug) to see which custom events have been added to a given element? Yours Andreas ...

JQuery event suppression..

hi, I have an input box, and I have bound both blur and keypress events to the input. but the problem is when there is a keypress event blur event also fires. Is there any way to suppress blur event when keypress event occurs? thanks ...

jQuery queue events

So what I want to do is to coordinate some effects using jQuery for some AJAX calls that I'm working with. My problem is that the fadeIn for the second div fires at the same time with the fadeOut for the first div. This could apply to other events as well so I'm curious, is there any way to make fadeId launch ONLY after fadeOut is done ...

Jquery bind several functions to one element

Strange, is there no possibility to put several binds in jquery, on one element? $('input').click(clickfn).click(clickfn) I am using 1.3.2 function clickme() { alert('click me') } $('.click', mod).bind("brrr", clickme).bind("brrr", clickme) .click(function() { $('.click', mod).trigger("brrr"); }); This is not worki...

How do I ignore mouse events on child elements in jQuery?

I have an unordered list with mouseover and mouseout events attached to the li elements. Each contains a link and there is a bit of padding in the li. When I mouseover the li the mouseover event is fired, but when I mouseover the link contained in the li the mouseout and the mouseover events are both fired in order. It seems the child el...

jQuery focus function not working in Firefox

The following piece of code focuses the text input after you click on the link. It works fine for Chrome 2.x, IE8 and Opera 9.64 but not on Firefox 3.0.9. The text input flashes quickly in Firefox then disappears, I'm currently working on Windows XP SP2. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1...

Keep focus on blur event

I am using jquery to keep the focus on a text box when you click on a specific div. It works well in Internet Explorer but not in Firefox. Any suggestions? var clickedDiv = false; $('input').blur(function() { if (clickedDiv) { $('input').focus(); } }); $('div').mousedown(function() { clickedDiv = true; }) .mouseup(function() {...

jQuery - Disable Click until all chained animations are complete.

Question The solution below is intended to slide down the groupDiv displaying div1 and enough space for div2 to slide in. It's all achieved by chaining the animations on the #Link.Click() element. It seems to bug out, though, when the link is clicked rapidly. Is there a way to prevent this? By perhaps disabling the Click function until...

jQuery - Multiple Field Blur

I'm working on some form validation using jQuery, validating each field onblur. Everything is working great, except when I have grouped (dependent) fields. What I'm looking for is a way to validate these fields only once all of them have been blurred. They can either be grouped as a collection of jQuery objects, or as children of a conta...

jquery lost events

I would like to know if is there some jquery known behaviour that cause the lost of events handlers (in particular in iframes)? I've a strange kind of problem. I've built a webapp composed of two iframe. First i load content in the first iframe. I add some event event handler using jquery to first iframe content dom. Everything works....

How to bind jquery event before event in tag executes

<input type="button" onclick="executes second" /> $('input').click(function() { //this first }} p.s. onclick="executes second" - cannot be removed (its __doPostBack) ...

Bind multiple events to jQuery 'live' method

jQuery's 'live' method is unable to handle multiple events. Does anyone know of a good workaround to attach multiple events to a function that polls current and future elements? Or am I stuck using duplicate live methods for each event handler I need? Example - I am trying to do something like: $('.myclass').live('change keypress blur'...

Rebind previous event

Hi! I would like to know how I can rebind the previous behavior of a normal link! example: function removeDefaultBehaviour(objects){ objects.each(function(){ $(this).data('onclick',$(this).attr('onclick')); $(this).attr('onclick','return false;'); }); }; function addDefaultBehaviour(objects){ objects.each...

Document Click triggered on 'enter' form submission

I'm having trouble understanding why a click event binded to the document would be triggered through an 'enter' form submission. Here's the test page I'm looking at: <html> <head> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js'&gt;&lt;/script&gt; <script type='text/javascript'> ...

Catch only a left clicks on links.

We are using event "click" to catch click on links and load content via ajax. But event happens also on right mouse and wheel clicks. How to process only left? confused // jquery.coyod-engine-0.5.0.js $(document).click(function(e){ var t = $(e.target); if(t.hasClass('aj')) { e.stopPropagation(); e.preventDefault();...

jQuery Tabs: How to disallow switching to a specific tab?

Hi, I am using jQuery Tabs. Some Tabs require user input. As soon as the user switches to an other tab these input values are validated. Now here is my question: How can I prevent showing any other tab as long as these input values are wrong? $("#tab").bind('tabsselect', function(){ if ( ... ) { alert ( 'Please fill...

jQuery children of cloned element not responding to events

Summary I am using jQuery to clone a div ("boxCollection") containing groups ("groupBox") each of which contains a set of inputs. The inputs have change events tied to them at $(document).ready, but the inputs inside the cloned divs do not respond to the event triggers. I can not get this to work in IE7, IE8, or FF3. Here is my sam...

Re-register events with jQuery

I have been adding new elements via jQuery in some of my projects, and I have stumbled across a bit of a cumbersome issue. Consider the following: $('span.claim').click(function() { $(this).parent().html('<span class="unclaim">Unclaim</span>'): }); $('span.unclaim').click(function() { $(this).parent().html('<span class="claim"...

jquery hover event not working properly

Hello, I have a simple horizontal menu and when I hover each one of the items a sub menu slides down. So basically it is a typical navigation menu that we see so often. I want that when hovering the sub menu slides down and up when mouse out. My problem is that if I move the mouse so fast through the items it happens that more than one ...

jquery's event.stopImmediatePropagation() doesn't seem to be working

I'm working with some existing javascript code which takes an LI and makes it droppable to an input field. I wanted to add an additional constraint to this, and enforce this by making my own event handler, and calling event.stopImmediatePropagation() if the constraint is not met. This existing javascript is look like this: $input.droppa...