trollolodn

#jquery: set an available option to selected

May 20th, 2013
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#report_area option").filter(function() {
  2.     //may want to use $.trim in here
  3.     return $(this).text() == "Sự kiện";
  4. }).attr('selected', true);
Advertisement
Add Comment
Please, Sign In to add comment