Skip to content

Instantly share code, notes, and snippets.

@whoisryosuke
Created September 10, 2019 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whoisryosuke/97fe8a3f6d78c7d8940648d370d54b71 to your computer and use it in GitHub Desktop.
Save whoisryosuke/97fe8a3f6d78c7d8940648d370d54b71 to your computer and use it in GitHub Desktop.
jQuery IIFE - Best practice for jQuery functions to wrap in IIFE -- example shows a shorthand of $(document).ready as $(function() {})
(function($) {
$(function() {
$('.example').dropdown();
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment