As simple as it can be
Use $(this)
here too
$(document).on("click",".appDetails", function () {
var clickedBtnID = $(this).attr('id'); // or var clickedBtnID = this.id
alert('you clicked on button #' + clickedBtnID);
});
More Related Contents:
- jQuery .on() method doesn’t see new elements
- Difference between .on(‘click’) vs .click()
- jQuery callback on image load (even when the image is cached)
- How can I trigger the same function from multiple events with jQuery?
- How to debug JavaScript / jQuery event bindings with Firebug or similar tools?
- How to bind ‘touchstart’ and ‘click’ events but not respond to both?
- How to trigger click event on href element
- jQuery – Detect value change on hidden input field
- Add and remove a class on click using jQuery?
- Alternative to jQuery’s .toggle() method that supports eventData?
- How can I check if a key is pressed during the click event with jQuery?
- How to stop default link click behavior with jQuery
- jQuery: fire click() before blur() event
- $(document).on(“click”… not working?
- return false from jQuery click event
- onHide() type event in jQuery
- Does AJAX loaded content get a “document.ready”?
- What’s the difference between keyup, keydown, keypress and input events?
- Using jQuery to programmatically click an link
- jQuery, checkboxes and .is(“:checked”)
- Resize event firing multiple times while dragging the resize handle
- How to get the id of the element clicked using jQuery
- How to pass values arguments to modal.show() function in Bootstrap
- jQuery get input value after keypress
- Click event called twice on touchend in iPad
- Fire event on enter key press for a textbox
- Cancel click event in the mouseup event handler
- Determine mouse position outside of events (using jQuery)?
- jquery click doesn’t work on hyperlink
- in Jquery how to run code with callback before submit