$(document).on('event', 'selector', function() {});
replaces .live()
.
$('selector').on('event', 'selector', function() {});
replaces .delegate()
.
$('selector').on('event', function() {});
replaces .bind()
.
More Related Contents:
- How can I upload files asynchronously with jQuery?
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How do I detect a click outside an element?
- Stop form refreshing page on submit
- Variable doesn’t get returned from AJAX function
- Only detect click event on pseudo-element
- How to differentiate single click event and double click event?
- TypeError: p.easing[this.easing] is not a function
- jQuery difference between change and click event of checkbox
- Rails 5: how to use $(document).ready() with turbo-links
- How to unbind a listener that is calling event.preventDefault() (using jQuery)?
- JQuery document.ready vs Phonegap deviceready
- Hide scrollbar while still being able to scroll with mouse/keyboard [duplicate]
- JavaScript/jQuery check broken links
- Why can’t we have return in the ternary operator?
- Alert when browser window closed accidentally
- How can I select an element by ID with jQuery using regex?
- Is it any limit for POST data size in Ajax?
- How can I find the length of a number?
- How to generate a thumbnail image after adding an image inside an input type=”file” in a form and submitting them both on the same form
- Can you have a JavaScript hook trigger after a DOM element’s style object changes?
- Get image preview before uploading in React
- How do I select the innermost element?
- How do I capture a key press (or keydown) event on a div element?
- Send form data using ajax
- Center an Image vertically and horizontally using CSS
- Change background on button click, using CSS only? [duplicate]
- CORS error with jquery
- Set value to currency in
- Checking if a URL is broken in Javascript