In this jquery tutorial, you will learn two ways to get data-id, data-attribute, data-text etc. But the help of attr () function you can get any attribute value like … To get the value in jQuery, use the data-attributes with the data() method. What is the best way to add options to a select from as a JS object with jQuery? Selected items can also be accessed via the :selected jQuery selector: $('#mySelect2').find(':selected'); It is possible to extend the