Last Updated: February 25, 2016
·
1.631K
· pixelclear

Injectable Ligature Service Icons

I wrote a simple jQuery Plugin that lets you manage service icons from your javascript file.

Note: This plugin uses the Ligature Symbols Font http://kudakurage.com/ligature_symbols/

Include the script

<script src="jquery.service.js"></script>

Place a tag for adding service icons in your layout

<div class="social"></div>

Then attach to a selector which services you would like to list

$(function() {

$("div.social").service("facebook", "stephenway")
           .service("linkedin", "stephenway", "personal")
           .service("twitter", "stephencway");

});

Now you have a clean way of injecting service icons on your site without relying on repetitive markup.

You can get the script on it's project page https://github.com/stephenway/jquery-service

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside