$("button").click(function() {
alert(this.id); // or alert($(this).attr('id'));
});
More Related Contents:
- jQuery .animate function not responding properly
- Reloading a single div in an html page [closed]
- jQuery doesn’t give a proper output, but gives these [closed]
- fixing slider on my website [closed]
- How to decode HTML entities using jQuery?
- Avoid dropdown menu close on click inside
- Reload an iframe with jQuery
- jQuery click not working for dynamically created items [duplicate]
- Stop setInterval
- Finding line-wraps
- How to clear the contents of an iFrame from another iFrame
- Creating a jQuery object from a big HTML-string
- How to format/tidy/beautify in JavaScript
- Creating a select box with a search option
- How to tell which row number is clicked in a table?
- Jquery Event Not Triggering for DOM Elements Created after page load [duplicate]
- Submit form after calling e.preventDefault()
- jQuery in Chrome returns “block” instead of “inline”
- Close a div by clicking outside
- Change form values after submit button pressed
- JavaScript on the bottom of the page?
- How to write into a file (in user directory) using JavaScript?
- How can I prevent a click on a ‘#’ link from jumping to top of page?
- ToggleClass animate jQuery?
- iframe Auto Adjust Height as content changes
- How can I dynamically highlight strings on a web page?
- How to properly unload/destroy a VIDEO element
- How to hide optgroup/option elements?
- how to use html2canvas and jspdf to export to pdf in a proper and simple way
- Html duplicated ID