Skip to content

Instantly share code, notes, and snippets.

@BretCameron
Last active March 7, 2019 12:53
Show Gist options
  • Save BretCameron/4f751d05edf6f6d731394eb0f951a382 to your computer and use it in GitHub Desktop.
Save BretCameron/4f751d05edf6f6d731394eb0f951a382 to your computer and use it in GitHub Desktop.
$('h1') // This selects every <h1> element
$('#main') // This selects an element with the ID 'main'
$('.open') // This selects every element with the class 'open'
$("[color='blue']") // This selects every element with an attribute 'color' equal to 'blue'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment