lib/social_share_button/helper.rb in social-share-button-0.0.3 vs lib/social_share_button/helper.rb in social-share-button-0.0.4

- old
+ new

@@ -2,17 +2,17 @@ module SocialShareButton module Helper def social_share_button_tag(title = "", opts = {}) rel = opts[:rel] html = [] - html << "<div class='social-share-button' data-title='#{title}'>" + html << "<div class='social-share-button' data-title='#{title}' data-img='#{opts[:image]}'>" SocialShareButton.config.allow_sites.each do |name| link_title = [t("social_share_button.share_to"),t("social_share_button.#{name.downcase}")].join("") html << link_to("","#", :rel => "nofollow #{rel}", "data-site" => name, :class => "social-share-button-#{name}", - :onclick => "return SocialShareButton.share($(this).data('site'), $(this).parent().data('title'));", + :onclick => "return SocialShareButton.share(this);", :title => h(link_title)) end html << "</div>" raw html.join("\n") end \ No newline at end of file