custom scripts
Always use separate jQuery file for function “script.js” and each code should be commented.
var $ = jQuery.noConflict();
/* Script on ready
------------------------------------------------------------------------------*/
$(document).ready(function(){
//do jQuery stuff when DOM is ready
}
/* Script on load
------------------------------------------------------------------------------*/
$(window).on('load',function() {
// page is fully loaded, including all frames, objects and images
});
/* Script on scroll
------------------------------------------------------------------------------*/
$(window).on('scroll',function() {
//do jQuery stuff when page on scroll
});
/* Script on resize
------------------------------------------------------------------------------*/
$(window).on('resize',function() {
//do jQuery stuff when window resize
});
/* Script all functions
------------------------------------------------------------------------------*/
function functionname(){
//do jQuery stuff when same function uses in multiple time
}