Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Is there a simple way to know the starting value of a select?
- <select>
- <option value='1' selected>one</option>
- <option value='2' >Two</option>
- $("select option[selected]").val()
- $('select').find('option[selected]').val();
- $('select').each(function(){
- $(this).data('originalValue',$(this).val());
- });
- var def = $("select > option").filter(function () {
- return this.defaultSelected;
- });
Add Comment
Please, Sign In to add comment