Last active
July 26, 2017 21:56
-
-
Save sendgrid-gists/90acd0df843dc81789dab7f08a2bc2fe to your computer and use it in GitHub Desktop.
SendGrid style-guide select
This file contains hidden or 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
<div class="input-select-wrap"> | |
<label class="input-select-label" for="select-example-default">State</label> | |
<div class="input-select"> | |
<select id="select-example-default"> | |
<option selected="true">Select a state</option> | |
<option value="AZ">Arizona</option> | |
<option value="CO">Colorado</option> | |
<option value="ID">Idaho</option> | |
<option value="MT">Montana</option> | |
<option value="NE">Nebraska</option> | |
<option value="NM">New Mexico</option> | |
<option value="ND">North Dakota</option> | |
<option value="UT">Utah</option> | |
<option value="WY">Wyoming</option> | |
</select> | |
</div> | |
</div> |
This file contains hidden or 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
$("#select-example-default").on('blur', function() { | |
$(this).parent().removeClass("is-focused"); // add is-focused on .input-select | |
}).on('focus', function() { | |
$(this).parent().addClass("is-focused"); // remove is-focused on .input-select | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment