Wondering if there is a way to combine identical code of 2 separate functions into 1 function.
In my case:
jQuery(\'body\').on(\'click\', \'.some_div
create a separate function and call it from required locations:
jQuery('body').on('click', '.some_div', function(e){ myFunction(); }); jQuery(window).resize(function() { myFunction(); }); function myFunction(){ // Long and fancy code }