jquery-on Questions

4

Solved

Where this is coming from When I first learned jQuery, I normally attached events like this: $('.my-widget a').click(function() { $(this).toggleClass('active'); }); After learning more about s...
Meeting asked 10/10, 2012 at 16:57

2

Solved

I have not seen the source of this function, but I wonder, does it work like this: Selects element(s) by their selectors Delegates the provided event-handlers to them Runs a setInterval on that se...
Emmerich asked 27/2, 2013 at 12:23

1

Solved

I have noticed that the event for $('#firstId') is not firing when the change is done by the Javascript itself. Why is this the case? Is there a way to still fire the event? Here is an exampl...
Decennary asked 11/11, 2016 at 13:51

3

Solved

I want to click on button 2 to trigger a click event on button 1. However, when I try the following, nothing happens when clicking on #2: no alert for #1 or #2. HTML: <div id="container">...
Musty asked 20/12, 2013 at 16:32

15

Solved

On the front page of a site I am building, several <div>s use the CSS :hover pseudo-class to add a border when the mouse is over them. One of the <div>s contains a <form> which, u...
Armbruster asked 8/6, 2009 at 21:21

3

Any one know why $.on.apply(this, args); gives me "Uncaught TypeError: Cannot read property 'apply' of undefined" I know for sure that $.on is defined in jQuery :/
Maltha asked 9/12, 2014 at 8:30

3

Solved

I have a page using jquery-ui-dialog. Each time the dialog opens, page contents load in using ajax. Then it binds some event using jquery "on()". When the dialog close, it will empty its content. ...
Cnemis asked 9/6, 2012 at 1:33

4

Solved

I'm trying to add the hoverIntent plugin to elements on my page, however some elements will be added to the DOM later on, which means I have to bind the plugin to future elements as well. How do yo...
Hypnotist asked 5/7, 2012 at 10:26

5

Solved

Problem: The blur and keyup events each fire once onload, and only onload. How can I get them to work correctly? jQuery: function myFunction(text){ alert(text); } $('#input1').on({ keyup: myFunc...
Macario asked 20/5, 2013 at 16:37

2

Solved

I want to call a function over specific elements on my DOM, for example: $(".red").css({backgroundColor: "pink"}); It works ok for any element already existing into the DOM, but I also want to t...
Prenomen asked 5/9, 2013 at 18:56

1

Solved

When an element contains another element that is being animated via a CSS transition, click events are occasionally not fired. Test case: http://codepen.io/anon/pen/gbosy I have a layout where a...
Dreda asked 3/4, 2013 at 12:5

2

Solved

I'm adding inputs dynamically into my page, so need to use .on to attach events to them. I'm trying to attach a change event to a type="file" input, but it's just not working. I've tried two ways...
Dupery asked 10/2, 2013 at 17:11

1

Solved

I used live() for generated pages and frames. But in jQuery 1.9 this function is deprecated and does not work. I use on() instead of live() but this method works for one time, and does not w...
Tuantuareg asked 5/2, 2013 at 9:6

4

Solved

So I've got a page with the following structure <div class="editCampaignBanner"> <div> <hr> <label for="file">Upload a new image</label> <input id="file" type=...
Fruin asked 18/10, 2012 at 8:25

3

Solved

Is it possible to use jquery .on() method instead of .delegate() when there is no event to be listened to? According to the .on() documentation: .on( events [, selector] [, data] , handler(eve...
Logrolling asked 9/8, 2012 at 14:32
1

© 2022 - 2024 — McMap. All rights reserved.