3 ms·
That's generally a bad idea. Think about the different versions of jQuery that come out right after a browser version does. On top of this, what if you want to
by IgorPartola 17y ago
That's generally a bad idea. Think about the different versions of jQuery that come out right after a browser version does. On top of this, what if you want to use a different library. How would we choose to use jQuery as opposed to Dojo or Prototype, etc.
I think the way things are right now, it works just fine with one small exception: I got spoiled by jQuery. I do everything in it. I don't mean just web projects, I mean I do command line stuff with it. I have Firebug installed and so every time I end up on a website where I need to extract some information out of it, I fire up Firebug and do something along the lines of this:
(function(){ var x = document.createElement( 'script' ); x.src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min...; document.getElementsByTagName('head')[0].appendChild( x ) } )();
// Wait for jQuery to load...
jQuery('span.comhead').each(function(){ console.log( jQuery(this).text() ) });
It would really be ideal if Firebug shipped with jQuery built in, or at least have an option. This way I wouldn't have to do this every time I want to do some DOM-fu. Come to think of it, I should make this I should publish this bookmarklet.
- ighost 17y agoGood idea, but it's been done. jQuerify bookmarklet: http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet http://www.learningjquery.com/2009/04/better-stronger-safer-...
- IgorPartola 17y agoVery cool. Noted, bookmarked and blogged (http://igorpartola.com/web-development/add-jquery-to-any-page-for-some-dom-fu http://igorpartola.com/web-development/add-jquery-to-any-pag...).
- deleted 17y ago[deleted]