JQuery Option ADD
/**
* id :id of the option
* state :Name of the state we are adding
* Dropdown id is :stateDD.
**/
function appendState(id,state){
$('#stateDD').append($("<option id='+id+' > "+ state + "</option>"));
}
JQuery Dropdown Option Remove ALL.
/**
* method will remove all the options Under the dropdown with ID:stateDD.
**/
function clearDD(){
$('#stateDD').find('option').remove();
}

No comments:
Post a Comment