A great place where you can stay up to date with community calls and interact with the speakers. Note: Do not start a class attribute with a number. A Computer Science portal for geeks. To learn more, see our tips on writing great answers. Thank you very much for you answers. Using document or 'body' instead of 'html' does not help, as document is not triggering at all with .not() and 'body' results in the same. How do I check whether a checkbox is checked in jQuery? OpenJS Foundation Terms of Use, Privacy, and Cookie Policies also apply. If dark matter was created in the early universe and its formation released energy, is there any evidence of that energy in the cmb? Finds the element with both "myclass" and "otherclass" classes. You surely missed $(document).ready() . Your code should be: $(document).ready(function(){ Syntax: $ (selector).not (A) The selector is the selected element which is not to be selected. Was Galileo expecting to see so many stars? rev2023.3.1.43269. Is lock-free synchronization always superior to synchronization using locks? While using W3Schools, you agree to have read and accepted our, , Selects all

elements with class="intro", Selects the first

  • element of the first