selected Attribute is used to specify which option should be by default selected when the page loads.This is a boolean attribute. Multiple buttons can be wrapped in a container with a data-role="controlgroup" attribute for a vertically grouped set. You have a select element, and you need to “select” one of its options based on one of its values. So when we click on the button, our jQuery code will find the option from the select tag which contains “Option 2” and adds the attribute “selected”. You may set the options available for the select box plug-in by using the jQuery code or by HTML 5 data attributes. Setting different options of the select box. data-* attributes. scrollContainer. A selector or element which is the scrollable container of the select. default: true. All these actions can be performed using the attr(), and removeAttr() jQuery methods.. Add attribute To add an attribute to a HTML element /or elements (any attribute, id, class, href, selected, etc. Every attempt is made to convert the attribute's string value to a JavaScript value … Home » Jquery » Javascript/jQuery: Set Values (Selection) in a multiple Select Javascript/jQuery: Set Values (Selection) in a multiple Select Posted by: … 4 jQuery Get and Set value . If you want to study these concepts in depth, take a look at MDN. Flip toggle switch. The optgroup jQuery mobile elements is used to group the selection list and the