jquery get option data attribute
$('#country').on('change', function(){
let id = $(this).find(':selected').data('id');
console.log(id);
});$(this).find(':selected').data('id');$(this).find(':selected').data('id')
Also in JavaScript:
- heroku node js h21 backend connection refused
- open json file r
- puppeteer quick start
- rock paper scissors javascript
- package.json laravel best
- regular expression characters
- apache log format json
- javascript validate email
- react form hook trigger is not a function
- sort array of objects by string property value
- javascript how to sort variables by user input
- how to generate a random number between 1 and 6 in javascript
- from json timestamp to date python
- integers to space separated string in javascript
- react live chat widget
- ajax call do something while
- for array javascript
- javascript get seconds between two dates
- component did mount mutation graphql
- parsley custom error message
- how to compare elements in an array
- angular reactive form get form control template
- js convert truthy
- stripe stripe js