Joined October 2012
·

Oliver Tupman

Software & Platform Architect at Antillion Ltd
·
London, UK
·
·
·

Agreed! If I get the chance I might look into that, though I do think someone else must have written one.... maybe :D

Posted to Bring jQuery in via the console over 1 year ago

@manudwarf - you're right, however I wanted to ensure that the jQuery.noConflict() was called, which isn't possible within an anonymous function because jQuery isn't present in the scope.

This is the one-liner:

(function() { var jq = document.createElement('script'); jq.src = "http://code.jquery.com/jquery-latest.min.js"; document.getElementsByTagName('head')[0].appendChild(jq);})()

@dpashkevich - oh, wow, that's awesome, I'd not spotted that feature before. Thanks for the tip!

Achievements
4,440 Karma
529,646 Total ProTip Views