Sexy jQuery Like Button Rating Plugin
https://likebtn.com/en/jquery-like-button-rating
Like button can be attached to any HTML element. See JSFiddle
<div data-identifier="item_1" class="like-button">Like button with identifier set using data-parameter</div>
<div data-identifier="item_2" class="like-button">One more</div>
<span id="like-button-x">For this Like button the identifier is set via options</span>
<i id="like-button-y">For this Like button the page URL is used as identifier</i>
$(document).ready(function($) {
$(".like-button").likebtn();
$("#like-button-x").likebtn({
identifier: "my_button",
theme: "github"
});
$("#like-button-y").likebtn({
theme: "disk"
});
});
Each button should have a unique identifier parameter (it can be understood as a button's name) to which votes are being connected. Identifier can be set:
- By settings data-identifier="unique_button_name" parameter for the element
<div data-identifier="unique_button_name" class="like-button">Like button with identifier set using data-parameter</div>
$(".like-button").likebtn();
- Identifier can be set via "identifier" parameter passed to likebtn() function:
<span id="like-button-x">For this Like button the identifier is set via options</span>
$("#like-button-x").likebtn({
identifier: "my_button"
});
- If identifier is not set for the Like button the page's URL is used as an identifier to which votes are being connected:
<i id="like-button-y">For this Like button the page URL is used as identifier</i>
$("#like-button-y").likebtn({
theme: "disk"
});
For the full list of available options see LikeBtn Settings and Code Generator
$("#like-button-x").likebtn({
identifier: "my_button",
theme: "github"
});
*Powered with ♥ by LikeBtn.com*