To learn more, see our tips on writing great answers. "data-status = YES" and select this options and apply all this options in red color .How can i do that .This "data-status" is written through php, How do i apply the font-weight :bold attribute to the option that has the data-status =YES Asking for help, clarification, or responding to other answers. $("#selectBox").append(''); Remove All Options Except The First. JavaScript Reference HTML DOM Reference jQuery Reference AngularJS Reference AppML Reference W3.JS Reference Programming Python Reference Java Reference. Last Updated. If you want to also select multiple options then you will need to add the multiple attribute to the select tag. How to enlarge a mask in Photoshop non-destructively ("bleeding", "outer glow")? I want to loop through options in the select box that has attribute set as "data-status = YES" and select this options and apply all this options in red color .How can i do that .This "data-status" is written through … How to Add Options to a Select Element using jQuery. I want to select a specific option of a select tag: the select has as follows: Red Did "Antifa in Portland" issue an "anonymous tip" in Nov that John E. Sullivan be “locked out” of their circles because he is "agent provocateur"? Failed dev project, how to restore/save my reputation? rev 2021.1.15.38327, Stack Overflow works best with JavaScript enabled, Where developers & technologists share private knowledge with coworkers, Programming & related technical career opportunities, Recruit tech talent & build your employer brand, Reach developers & technologists worldwide, How do i increase the Font size of the option item, @Derby, you cannot change the font-size on a per-option basis. i added it using .addClass("bold"), I believe this is what you are looking for. So for example if they update the color option to blue i need to trigger a call in jquery to show that select element with id colorOpt was updated with the value of 3. I don't think you can set the color of an