Last active
August 18, 2016 16:55
-
-
Save brianpetro/b8bcd79bb50d1025cb0fcd098185644c to your computer and use it in GitHub Desktop.
jquery to angularjs snippet 1
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
// this one | |
$('.navi li:first-child').css('background-color', 'yellow'); | |
// Also this one | |
$('.navi li').on('click', function(e){ | |
// what does ‘this’ refer to? | |
$(this).css('background-color', 'green'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment