Created
March 3, 2017 13:26
-
-
Save mariapaulinar/88434178bfa58b56107437c595b53bde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Seleccionar un option específico en un select | |
$('option[value="SEL1"]').prop('selected', true); //Por value | |
$('option:eq(1)').prop('selected', true); //Por índice | |
$('option:contains("Selección 1")').prop('selected', true); //Por algún texto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment