Suppose custom_excellent_programming_tricks.js is the js file and code inside would be
(1) (function($) {
//alert();
})( jQuery );
(2)
jQuery(document).ready(function( $ ) {
// //alert();
});
(3)
(function($) { $(document).ready(function() {
// alert('adaaa');
// Code... });
})( jQuery );
(4)
$(function(){
$(document).ready(function() {
//alert();
// Code...
});
})(jQuery);
or
(5) (function() { ...})();
or
(6) jQuery(document).ready(function( $ ) { ... });
- Mainly $(function(){ ........ })(jQuery); or (function() { ...})();
- functions.php
- require get_template_directory().'/inc/enqueue.php';
No comments:
Post a Comment