Command for loading jQuery on Google Chrome inspector? -


i remember seeing there specific command put on google chrome's inspector console load jquery , allow execute jquery commands.

however, cannot remember command was, , searching online brings me unrelated results.

anyone knows command?

thanks!

edit: years later had realized asking $$ function in console. however, not jquery provides similar selector option, shorthand document.queryselectorall. answers here address adding jquery real, of functionality.

you mean, script load jquery in arbitrary page? have constructed following cross-browser bookmarklet purpose:

javascript:if(!window.jquery||confirm('overwrite\x20current\x20version?\x20v'+jquery.fn.jquery))(function(d,s){s=d.createelement('script');s.src='https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js';(d.head||d.documentelement).appendchild(s)})(document); 

it detects whether jquery exists. if does, confirmation dialog appears, in current version shown, can decide whether it's ok overwtite existing jquery object.

currently, jquery 1.8 loaded cdn on ssl.

to save time editing, here's same bookmarklet top of answer, getting latest version (instead of fixed one) http://code.jquery.com/:

javascript:if(!window.jquery||confirm('overwrite\x20current\x20version?\x20v'+jquery.fn.jquery))(function(d,s){s=d.createelement('script');s.src='http://code.jquery.com/jquery.js';(d.head||d.documentelement).appendchild(s)})(document); 

note: having latest version nice, don't surprised when jquery "behaves weird" (=updated).


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -