I’m looking for a javascript solution to find all jQuery scripts on a html page and replace the code with the latest version of jQuery.
Original line:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
Replace with:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script>
That works for me. You can see it in this demo, but you’ll have to type the command
$.fn.jqueryin the console to see that the version has actually changed.