Group Mods

  • Profile picture of hnla
  • Profile picture of r-a-y
  • Profile picture of @mercime

Need Help with a share plugin i’m creating (10 posts)

Started 1 year, 5 months ago by: modemlooper

  • Profile picture of modemlooper modemlooper said 1 year, 5 months ago:

    I am extending on the tweet button plugin and creating a share button that as more options. The problem is when I add an activity update and the ajax refreshes and adds it to the stream its not calling the javascript for the buttons. Any update that was loaded after a page refresh then the buttons show up.

    What are my options?

    New at javascript and and want to learn more. Button testing over here: http://tempsg.com/activity/

    Here you can see it doesnt load the javascript thats used to call the buttons.
    Screen shot 2010-08-21 at 5.21.38 PM

  • Profile picture of modemlooper modemlooper said 1 year, 5 months ago:

    Hmm, maybe my approach is wrong and I shouldn’t load the buttons until “share’ is clicked.

  • Profile picture of modemlooper modemlooper said 1 year, 5 months ago:

    Weird Twitters js works fine but BUZZ and FB does not. FB likes button via iframe works.

  • Profile picture of PH (porsche) PH (porsche) said 1 year, 5 months ago:

    Oh boy, I love this.. it was exactly what I was searching for. searched “Share” and this was the first hit!

  • Profile picture of mvvspr mvvspr said 1 year, 5 months ago:

    Liked it very much.A value addition to any site.
    @modemlooper
    When can we expect it in repo.

    Thanks,
    Prashant

  • Profile picture of josemv josemv said 1 year, 5 months ago:

    Excellent…nothing more to say !

    One question tho: is there any way to track shares ? Like how many times an activiy item has been shared in Buzz, FB, etc…

  • Profile picture of Kenneth Henderson Kenneth Henderson said 1 year, 5 months ago:

    Is there a download for this yet? Looks promising.

  • Profile picture of modemlooper modemlooper said 1 year, 5 months ago:

    Not ready yet, having trouble getting 3-party buttons to work when you update the activity stream with ajax as it doesn’t reload the javascript for the buttons to show up.

    Anyone good with jquery and loading external scripts via ajax?

  • Profile picture of r-a-y r-a-y said 1 year, 5 months ago:

    It’s because FB and Buzz uses javascript to render the button.
    And because you’re trying to load javascript on an AJAX call, this won’t work.

    I wouldn’t call myself a jQuery ninja, so I can’t really help you out here I’m afraid.
    Not sure if it’s possible.

    *Edit – Maybe try jQuery.getScript?

    http://api.jquery.com/jQuery.getScript/

  • Profile picture of Paul Gibbs Paul Gibbs said 1 year, 5 months ago:

    Without seeing your javascript, hard to comment. But if you’re doing anything like jQuery(‘#something’).click( function() { … } ), use jQuery(‘#something’).live( ‘click’, function() { … } ) instead.