Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sapegin/social-likes

Beautiful social “like” buttons with counters for jQuery.
https://github.com/sapegin/social-likes

Last synced: 13 days ago
JSON representation

Beautiful social “like” buttons with counters for jQuery.

Awesome Lists containing this project

README

        

# Social Likes

[![Powered by You](http://sapegin.github.io/powered-by-you/badge.svg)](http://sapegin.github.io/powered-by-you/)
[![Build Status](https://travis-ci.org/sapegin/social-likes.svg)](https://travis-ci.org/sapegin/social-likes)

**[Try the all new Social Likes Next](http://social-likes-next.js.org/): no jQuery, no counters, Retina, IE11+, improved skins.**

Beautiful share buttons with counters for popular social networks: Facebook, Twitter, Google+, Pinterest, Vkontakte, etc. Uses jQuery.

[![](http://wow.sapegin.me/image/1f1U2S130d3R/social-likes.png)](http://sapegin.github.io/social-likes/)

[See demo](http://sapegin.github.io/social-likes/)

## Features

- Easy to install.
- Beautiful and all in one style (with three different skins).
- Won’t explode your page’s layout.

## Installation and configuration

Use [interactive builder](http://sapegin.github.io/social-likes/) to generate the code.

Or install via npm: `npm install --save social-likes`.

## Advanced configuration

### Layout

#### Default

All buttons in a row.

```html


```

#### Vertical

All buttons in a column.

```html


```

#### Single button

One button with a counter (sum of all the networks). Opens popup with like buttons in vertical layout. Use `data-single-title` attribute to change button title.

```html


```

#### Icons only

If you want to remove button titles add `social-likes_notext` class to make it looks better.

```html


```

### Options

Options define via HTML data attributes or JavaScript parameters object.

`url`

URL of shareable page. Current page by default.

`title`

Title for Twitter, Vkontakte and LiveJournal. Current page’s title by default.

`html`

HTML code for LiveJournal button. By default tag with link to current page.

`counters`

Disables “likes” counters when “no”. Default: “yes”.

`zeroes`

Show counters even when number is `0`. Default: “no”.

`single-title`

Share button title for “single button” mode. Default: “Share”.

Examples:

```html


```

```html


```

```js
$('.social-likes').socialLikes({
url: 'https://github.com/sapegin/social-likes/',
title: 'Beautiful “like” buttons with counters for popular social networks',
counters: true,
singleTitle: 'Share it!'
});
```

### Services specific options

#### Twitter

You can specify `via` (site’s or your own Twitter) and `related` (any other Twitter you want to advertise) values for `