Tagged Questions
0
votes
1answer
22 views
How do you share events accross windows on same domain?
Suppose I have an iframe on my page and I have an event that can be triggered from either the parent or inside the frame but I need listeners on both pages to execute when either one is triggered. ...
2
votes
2answers
374 views
Is there a way to use event.preventDefault with focusOut? If not, why?
I would like to prevent the default event from a focusOut (or blur) event and keep the focus set to the specific input field.
This is what I have already tried:
using event.preventDefault() at the ...
0
votes
2answers
64 views
console log for js function showing undefined [on hold]
I am trying to print the function and see in console. log
but i am not sure whether i am doing it correctly...
since when i print it in console.log it show undefined
not sure whether i am doing it ...
7
votes
4answers
3k views
How do you log all events fired by an element in jQuery?
I'd like to see all the events fired by an input field as a user interacts with it. This includes stuff like:
Clicking on it.
Clicking off it.
Tabbing into it.
Tabbing away from it.
Ctrl+C and ...
0
votes
1answer
16 views
My javascript variable (array) is modified during .trigger/.on process
I have a small function I use to process ajax request and get data from it.
Once all my JSON is aggregated in a array I fire an event.
My problem is that my variable mySources, an array, is ...
0
votes
5answers
47 views
how to get all the selected checkboxes after they got unchecked
Let's start from the beginning...
I have checkboxes in the table and they have unique VALUES.
For example:
<input type="checkbox" value="2">
<input type="checkbox" value="3">
I want to ...
-2
votes
7answers
57 views
Jquery, “on” method is not binding properly in dynamically elements
After reading a bunch of solutions to my problem I couldn't find an answer, so I did mine.
I'm adding html code when a button is clicked like this:
$(".button").on('click',function(){
var p = ...
0
votes
3answers
21 views
Is there something you can do with bind that you can not do with on?
The documentation to jQuery's bind method states that:
As of jQuery 1.7, the .on() method is the preferred method for attaching event handlers to a document.
Does that mean that the bind method ...
0
votes
3answers
40 views
How to know if the key up event has been already done its job or not in the event handler
I have a key up event handler for a text box.
In that event handler am checking for the key code 46/8(Back space/Delete). And am getting the resulted value of the text box after these keys are ...
0
votes
0answers
13 views
body missing mousedown event with Openlayers
I've add a mousedown event to <body> using jQuery's .bind() function like the following code:
$('body').bind('mousedown', function(){alert(1)});
It works perfectly else anywhere on the ...
0
votes
1answer
27 views
Why doesn't my jQuery respond to window resize?
I'm using jQuery to add some make some elements on a page transition (via the jQuery Transit plugin) when hovered upon. Since I'm trying to design responsively, I want these transitions to only happen ...
1
vote
2answers
2k views
Prevent firing focus event when clicking on div
This question is similar to my previous question, Click action on Focused DIV,
but this time the main topic is, How to prevent focus event from triggering when I click one of the divs.
Last time I had ...
1
vote
2answers
37 views
Does setting jQuery.data() trigger an event?
I'm wondering if calls to $(".domElement").data("key", "newValue") will trigger an event that I can handle? I've tried binding change but this doesn't get triggered when data is set.
I think this ...
6
votes
5answers
5k views
how do stop events bubbling in Jquery?
How do I stop custom event bubbling in jquery?
for example I have this code:
$('.myclass').bind('amodaldestroy', function(){
....does something.....
})
How do I only allow this to be triggered ...
0
votes
1answer
48 views
How to have click or other handler attached to dynamically generated dom in jQuery? [duplicate]
I have form with single text input to which I want to add functionality - on click generate new text input. Here's my code:
HTML
<form>
Fill:
<input type="text" name="0" ...