Questions tagged [jquery-focusout]

A jQuery method which allows you to bind an event handler to the "focusout" JavaScript event.

This method is a shortcut for .on( "focusout", handler ) when passed arguments, and .trigger( "focusout" ) when no arguments are passed. The focusout event is sent to an element when it, or any element inside of it, loses focus. This is distinct from the blur event in that it supports detecting the loss of focus on descendant elements (in other words, it supports event bubbling).

39 questions
15
votes
3 answers

jQuery focusout for entire div and children

I have a div that I am creating dynamically via jQuery with some links/buttons in it. When this div loses focus I need to remove it. This part I can do ok. However, right now I have the focusout event on the wrapper for the div and when I click on a…
Helto
  • 565
  • 1
  • 4
  • 17
10
votes
5 answers

How to trigger focusout event

I have a focusout event $('.alpha').on("focusout", function () {...}); and I want want to trigger it from somewhere else in the code. I tried $('#input12').focus().blur(); and also tried $('#input12').trigger("focusout") edit: I am using a…
itay312
  • 1,518
  • 4
  • 24
  • 36
6
votes
2 answers

jQuery - raise event when focus leaves a group of controls

I have 3 textboxes within a div and I need to raise an event when focus leaves one of those inputs and doesn't go to another one of these 3 inputs. As long as the user is editing one of these 3 controls, the event wont raise. The event will only…
user779444
  • 1,365
  • 4
  • 21
  • 38
3
votes
2 answers

Why is my jQuery focusout (or blur) event not being fired?

At the bottom of the jsfiddle here, I have this HTML:
..and this jQuery: $(document).on("focusout", '[id$=boxSection5Total]',…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
3
votes
1 answer

Make focusout event ignore some elements

In the code below if you click on and a "red block" appears. If you focus out then the "red block" disappears. How do I make it so that focusout wont fire if "red block" or are the next…
Hello-World
  • 9,277
  • 23
  • 88
  • 154
2
votes
1 answer

Dropdown focusout not working on descendant elements as expected

I'm aware this is a common question but none of the answers I've seen solve my problem, apologies if I have missed one and this can be removed/marked as duplicate obviously... Markup
no.
  • 2,356
  • 3
  • 27
  • 42
2
votes
1 answer

Prevent jQuery event queuing

I have the following jQuery which is working beautifully: