Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

reset a select option jquery

$('#baba').prop('selectedIndex',0);
Comment

jquery select clear options

$('#mySelect')
    .find('option')
    .remove()
    .end()
    .append('<option value="whatever">text</option>')
    .val('whatever')
;
Comment

reset select form jquery

 $('select').each( function() {
        $(this).val( $(this).find("option[selected]").val() );
    });
Comment

reset select option jquery

$('ClassOrIDName').prop('selectedIndex',0); 
// this works perfectly. just put this in any action and your 1st option should be 'select one item' type
Comment

PREVIOUS NEXT
Code Example
Javascript :: java.lang.outofmemoryerror (no error message) react native 
Javascript :: react native image fit container 
Javascript :: npm ERR! Fix the upstream dependency conflict, 
Javascript :: date add 1 hour javascript 
Javascript :: javascript function to format phone number 
Javascript :: js scroll to bottom 
Javascript :: check if path is folder js 
Javascript :: jquery set title attribute 
Javascript :: shorthand for document.ready 
Javascript :: how to get name array value in jquery 
Javascript :: javascript can you defer inline 
Javascript :: javascript select element with attribute 
Javascript :: chart js hide legend 
Javascript :: javascript check if two date ranges overlap 
Javascript :: oncheck event jquery 
Javascript :: javascript remove focus from button 
Javascript :: axios Cross origin http://localhost forbidden 
Javascript :: js for each character in string 
Javascript :: gdscript yield timer 
Javascript :: devextreme datagrid get selected row keys 
Javascript :: clone object in js 
Javascript :: javascript round decimal 2 digits 
Javascript :: timeout javascript 
Javascript :: Javascript how to run hello world 
Javascript :: jquery success refresh page 
Javascript :: checkbox on click jquery select all 
Javascript :: include node_modules from search vscode 
Javascript :: js onsubmit prevent default 
Javascript :: javascript loop FormData 
Javascript :: flash input js 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =