You want the ‘change’ event handler, instead of ‘click’.
$('#mySelect').change(function(){
var value = $(this).val();
});
More Related Contents:
- Get one element title and add this to another div in jquery
- how do i submit message to my email by html or js?
- JS hide function error
- Get the longest text in HTML document using Jquery or javascript
- Hide/Show image on one click [closed]
- How to create button to check uncheckable checkbox
- How to move an element into another element?
- JSFiddle code not working in my own page
- How to prevent a click on a ‘#’ link from jumping to top of page?
- How to calculate the XPath position of an element using Javascript?
- How to disable scroll without hiding it?
- Uncaught Error: SECURITY_ERR: DOM Exception 18 when I try to set a cookie
- jQuery: Get selected element tag name
- HTML anchor link – href and onclick both?
- Set date in input type date
- document.getElementsByClassName().innerHTML always returns “undefined”
- Save a pre element as PDF with CSS
- Browser back button handling
- How To Show And Hide Input Fields Based On Radio Button Selection
- jQuery Validation using the class instead of the name value
- Center flex item in container, when surrounded by other flex items
- Change the style of :before and :after pseudo-elements? [duplicate]
- Onclick reload the div only
- jQuery: How to listen for DOM changes?
- submit event does not fire if submit initiated programmatically
- How can I remove wrapper (parent element) without removing the child?
- How to Bootstrap navbar static to fixed on scroll?
- How to highlight a part part of an Input text field in HTML using Javascript or JQuery
- Test if an element can contain text
- Geolocation closest location(lat, long) from my position