Defining jquery when it's undefined -


when error $(document).ready(function(){ undefined, because jquery library not on page situation, error occurs since have small jquery plug-in on pages resolve issue when jquery library present during particular time of user's session.

besides placing jquery library on page when particular error occurs, solution check if jquery present or error not occur on page overall?

// if jquery isn't defined if (typeof jquery == 'undefined') {  } else { // jquery loaded       // run jquery code }; 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -