SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2013
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding Social Media Share buttons to a query

    I would like to add a Facebook and Twitter share button to some JS code I have but not sure how to go about it?

    Ideally I'd like a small share this button that would bring up a custom message that I have created

    How do I go about this?

    @Pullo

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    London, United Kingdom
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can start from looking at the javascript snippet that add the buttons on the page. Most of them just create a script element and then add an iframe into the element with specific class or id (target element). So your script should do the same but for all of them. The target elements should be placed into the element with the custom message that you mentioned.
    CodeReview4U - boost your code and skills for
    being social - JavsScript and C# code reviews.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2013
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, are there any walkthroughs or anything around?

    I'm still REALLY new to JS so its a learning curve for me


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •