Date Added: 14/01/2015


function change_option_byvalue(select,value){

 $(select).find("option:selected").removeAttr("selected");
 $(select).find("option[value='"+value+"']").attr('selected','selected');
 $(select).find("option[value='"+value+"']").trigger('click');

 var selectparent =$(select).parent();
 var newselect =$(select).clone();
 $(select).remove();

 selectparent.append(newselect);
 }
change_option_byvalue("select[name='muslum']",21);  // it will select the option that has value of 21  by muslum21


Last Update: Posted by: müslüm ÇEN
Not Commented Yet !
Please login in order to comment . Login