Skip to content

Instantly share code, notes, and snippets.

@saylerb
Last active August 19, 2016 15:55
Show Gist options
  • Select an option

  • Save saylerb/a05defac240427f850ff44ed3d44378c to your computer and use it in GitHub Desktop.

Select an option

Save saylerb/a05defac240427f850ff44ed3d44378c to your computer and use it in GitHub Desktop.

From Bocoup's jQuery Fundamentals

  1. What is something you learned that was particularly surprising/interesting?
  • This is tricky: $() function always returns a jQuery object, and an object is always truthy, so sometimes it's hard to know if you've actually selected what you wanted to select.

  • Jquery has methods that can generate HTML with $()

       $( '<p>', {
          html: 'Hello!',
          'class': 'greet'
        });
  • You can clone objects? whatttt

  • Namespaced events are pretty cool

  1. What was something you already knew?
  • How to select stuff
  • Chaining
  • Altering elements
  • AJAX
  1. Was there anything you feel you still don't understand?
  • With es6, arrow functions change the way this is handled. This can affect you jQuery
  • Event bubbling and delegation, still need more practice with this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment