Created
June 11, 2016 02:37
-
-
Save resarahman/294a1a8c9c204f7faec8d7b34cf84ff9 to your computer and use it in GitHub Desktop.
Learn jQuery - Lesson 4
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
(function() { | |
var link = $('link'); | |
$('button').on('click', function() { | |
var $this = $(this), | |
stylesheet = $this.data('file'); | |
link.attr('href', stylesheet + '.css'); | |
$this | |
.siblings('button') | |
.removeAttr('disabled') | |
.end() | |
.attr('disabled', 'disabled'); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment