Created
December 6, 2012 00:21
-
-
Save psynewave/4220821 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jGFeed 1.0 - Google Feed API abstraction plugin for jQuery | |
* | |
* Copyright (c) 2009 jQuery HowTo | |
* | |
* Licensed under the GPL license: | |
* http://www.gnu.org/licenses/gpl.html | |
* | |
* URL: | |
* http://jquery-howto.blogspot.com | |
* | |
* Author URL: | |
* http://me.boo.uz | |
* | |
*/ | |
(function($){ | |
$.extend({ | |
jGFeed : function(url, fnk, num, key){ | |
// Make sure url to get is defined | |
if(url == null) return false; | |
// Build Google Feed API URL | |
var gurl = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+url; | |
if(num != null) gurl += "&num="+num; | |
if(key != null) gurl += "&key="+key; | |
// AJAX request the API | |
$.getJSON(gurl, function(data){ | |
if(typeof fnk == 'function') | |
fnk.call(this, data.responseData.feed); | |
else | |
return false; | |
}); | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
your are sharing is well and good.the experience candidate should be understand but a fresher how to understand this code?. so please keep it your sharing with full explanation. had me going School web design uk