Created
January 12, 2015 19:19
-
-
Save fieldoffice/94c490ad69b77ef7b71d to your computer and use it in GitHub Desktop.
Card Expiry Year
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
<script type="text/javascript"> | |
var select = $('.card-expiry-year'), | |
year = new Date().getFullYear(); | |
for (var i = 0; i < 12; i++) { | |
select.append($("<option value='"+(i + year)+"' "+(i === 0 ? "selected" : "")+">"+(i + year)+"</option>")) | |
} | |
</script> | |
<select class="card-expiry-year"></select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment