From 9377d3a2b95347a505e2a2a82f3a8a1bcde0056b Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Mon, 17 Jan 2011 17:55:41 +0100 Subject: [PATCH 1/2] fixed wrong reference to options --- jquery.addthis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.addthis.js b/jquery.addthis.js index d258319..c759011 100644 --- a/jquery.addthis.js +++ b/jquery.addthis.js @@ -42,7 +42,7 @@ // include the script $.getScript(addthisurl, function(){ - $(options.elem).append(btn_image).attr('href', 'http://www.addthis.com/bookmark.php?v=250').mouseover( + $(opts.elem).append(btn_image).attr('href', 'http://www.addthis.com/bookmark.php?v=250').mouseover( function(){ return addthis_open(this, '', opts.url, opts.url_title); }).mouseout( @@ -61,4 +61,4 @@ init(); } -})(jQuery); \ No newline at end of file +})(jQuery); From 416905caabab001226016fe30137bc04db52a2c9 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Mon, 17 Jan 2011 17:59:30 +0100 Subject: [PATCH 2/2] added language option --- jquery.addthis.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jquery.addthis.js b/jquery.addthis.js index c759011..d795682 100644 --- a/jquery.addthis.js +++ b/jquery.addthis.js @@ -3,6 +3,7 @@ * (c)2009 Brent Wong * * Modified by Nick Shepherd + * Modified by Massimiliano Arione * * Usage: * $.addthis(); @@ -15,6 +16,7 @@ * btn_size: the size of the button to be displayed (large, small) * url: the url to be shared (default: '[URL]') * url_title: title of the url to be shared (default: '[TITLE]') + * lang: the language of button (default: 'en' for english) */ (function($){ $.addthis = function(code, options){ @@ -26,7 +28,8 @@ elem: 'a.addthis', btn_size: 'large', url: '[URL]', - url_title: '[TITLE]' + url_title: '[TITLE]', + lang: 'en' } var opts = $.extend(defaults, options); @@ -36,9 +39,9 @@ var btn_image = ''; if(opts.btn_size == 'large') - btn_image = 'Bookmark and Share'; + btn_image = 'Bookmark and Share'; else - btn_image = 'Bookmark and Share'; + btn_image = 'Bookmark and Share'; // include the script $.getScript(addthisurl, function(){