Created
February 13, 2016 21:48
-
-
Save drakvuf/ce9546c3de6b6009d730 to your computer and use it in GitHub Desktop.
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
//jQuery | |
var el = $('.example'); | |
el.hasClass('className'); | |
//native Js | |
var el = document.querySelector('.example'); | |
el.classList.contains('className'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Has class example with jQuery and with native Javascript.