Decrease Font Size
Increase Font Size

Social Sharing Buttons using jQuery and XML

Social Buttons using jQuery and XML|

Social Sharing Buttons |

Social Sharing Buttons using jQuery and XML|

Social Networking Sharing Buttons|

Sharing Button


Yet, another social sharing buttons script created by using jQuery and XML for your website. The script is very straight forward and self explanatory. The buttons container and buttons setting are stored in the XML file.

Figure 1

buttons in vertical

Figure 2

buttons in horizontal

How to use it?

  1. Download the SocialButton.xml and file. This script requires the latest jQuery library, get it at

  2. Open the SocialButton.xml and customize the necessary setting. You can customize the div container border style, width, color, position, and margin and background color. The DivMargin allow us to adjust the div container to the left and right.

  3. Listing 1:
    <!--solid, dotted, dashed, none -->
        <!--Border width (int) -->
        <!--Border color-->
        <!--left, right, top, bottom -->
        <!--left or right (px) -->
        <!--Div background color -->

    You have the option to show or hide a particular social button.

    Listing 2:
    <!--none, block -->
  4. Open the file and provide the location of the XML file on your server. Use absolute link if you are not sure of the relative path and make sure the script and xml file are in the same domain. For example:

    Figure 3

  5. Place the scripts before the body tag in the master page, template or web page that you want the social buttons to appear. For instance:

    Figure 4


Frequent Questions and Answers

  1. Does your script work on different platforms?
    Yes, it should be cross-browser compatible.

  2. How come I don't see the social sharing button that I like?
    Currently, the script only provide the option to show or hide Google Plus One, Facebook like/Sharing, Twitter, Digg, StumbleUpon, and AddThis buttons. You can modify the script to fit your requirements.

  3. Is this script free?
    Yes. Use at your own risk.

  4. Why there are white space in between the button?
    Some buttons do not display the counter if the count is zero.


I hope someone will find this information useful and make your programming job easier. If you find any bugs or disagree with the contents or want to help improve this article, please drop me a line and I'll work with you to correct it. I would suggest downloading the demo and explore it in order to grasp the full concept of it because I might miss some important information in this article. Please send me an email if you want to help improve this article.

Watch this script in action




Comments are closed