Front End Development javascript tips & snippets: caching cdn Google javascript jquery page load speed
by bseanvt
leave a comment
Link to jQuery Source from Google’s CDN
https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js
That is the link to the jQuery source hosted by Google on their CDN. It’s probably already cached on client machines so it should be as fast as is possible! You can read more/use other Javascript libs from Google’s CDN here: http://code.google.com/apis/libraries/devguide.html#jquery
Documentation: api dictionary Documentation jquery mac os x Rails yui
by bseanvt
leave a comment
Ruby on Rails, jQuery and YUI API Docs Available as Mac OS X Dictionary Binaries
I came across an awesome tool this morning. Priit Haamer has chunked Ruby on Rails, jQuery, and some of YUI documentation into native Mac OS X dictionary binaries. This lets you search those API docs from Spotlight, TextMate, any application that uses the dictionary app!
I have tested the Ruby on Rails API within TextMate. Hover over any function and hit ctl+cmd+d and a little popup will give you a glimpse at the API docs. Seems like a nice alternative to ACK or the normal TextMate function lookup.
More information and installation instructions are available at Priit’s site http://www.priithaamer.com/blog
Here is a nice video of the tool
Using jQuery and Prototype Javascript Together with jQuery.noConflict();
To use the jQuery javascript framework in a Rails application, that also uses the Prototype framework for the same application, you’ll need to reassign the $() function for jQuery to another variable. This is very simple to do. Just make sure to include the jQuery library after you load your prototype defaults.
Here is the javascript to alias the $() function
script type="text/javascript"
var $_ = jQuery.noConflict();
$_(document).ready(function(){
$_("a").click(function(){
//... do something
});
});
/script


