Joined October 2012
·
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
532,914 Total ProTip Views
Forked
Have a project valued enough to be forked by someone else
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Mongoose
Have at least one original repo where Ruby is the dominant language
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Charity
Fork and commit to someone's open source project in need
Agreed! If I get the chance I might look into that, though I do think someone else must have written one.... maybe :D