Created
June 11, 2016 02:37
-
-
Save resarahman/e7643899fe35e1ecc591b601a511889f to your computer and use it in GitHub Desktop.
Learn jQuery - Lesson 4
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
| (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