Which of these snippets represents a wrapper that calls jQuery safely and doesn’t require repetitive use of the word “jQuery”?

Advertisement

  • // do stuff
    });
  • (function($) {
    // do stuff
    })( jQuery );
  • $(function() {
    // do stuff
    });
  • jQuery(function($) {
    // do stuff
    });
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend