Skip to content

Instantly share code, notes, and snippets.

@quickstep25
Last active August 29, 2015 14:05
Show Gist options
  • Save quickstep25/1db89ba9e0f1fb93adcc to your computer and use it in GitHub Desktop.
Save quickstep25/1db89ba9e0f1fb93adcc to your computer and use it in GitHub Desktop.
JavaScript - IIFE TEMPLATE - when minified the code variables in scope will be minimized as well. - ref: http://toddmotto.com/what-function-window-document-undefined-iife-really-means/
// IIFE Functions in JavaScript
(function ($, window, document, undefined) {
'use strict';
$(document).ready(function () {
// .. javascript code here ...
});
}(jQuery, window, document));
// WHEN MINIMIZED IT BECOMES .....
!function($,n,t,u){"use strict";$(t).ready(function(){})}(jQuery,window,document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment