GithubHelp home page GithubHelp logo

deawx / jquery.sharebox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seebz/jquery.sharebox

0.0 2.0 0.0 25 KB

Easily add a sharebox (list of social buttons) on your website

License: Do What The F*ck You Want To Public License

HTML 13.56% CSS 21.99% JavaScript 64.45%

jquery.sharebox's Introduction

jquery.sharebox

This jQuery plugin allow you to easily add a sharebox (list of social buttons) on your website.

Screenshot

Setup

Simply load jQuery and the provided files from the right place:

<!-- jQuery -->
<script src="path/to/jquery.min.js"></script>

<!-- jquery.sharebox -->
<script src="path/to/jquery.sharebox.min.js"></script>
<link href="path/to/jquery.sharebox.min.css" rel="stylesheet">

Note: The optional jquery.sharebox.icons.css stylesheet contains all icons in the data URI scheme.

Usage

jquery.sharebox will automatically load any .sharebox elements:

<!-- .sharebox elements are automatically loaded -->
<div class="sharebox"></div>

Off course, you can also initialize jquery.sharebox with the element you want:

<div id="my-sharebox"></div>
<script>
jQuery(document).ready(function() {
	jQuery("#my-sharebox").sharebox();
});
</script>

Configuration

Options

jquery.sharebox accepts the following options:

Name Description Default value
url The URL to share URL of the document
title The name of the element to share Title of the document
services The services you want to use * facebook twitter google+

* Separated by space

The HTML way

With jquery.sharebox, you can easily set options using HTML5 custom data attributes.

<!-- .sharebox elements are automatically loaded -->
<div class="sharebox"
     data-url="http://www.example.com/"
     data-title="My awesome title"
     data-services="facebook twitter google+ print"
     ></div>

The javascript way

The jquery.sharebox plugin allows you to set options by passing an object on initialization:

<div id="my-sharebox"></div>
<script>
jQuery(document).ready(function() {
	jQuery("#my-sharebox").sharebox({
		url      : "http://www.example.com/",
		title    : "My awesome title",
		services : "facebook twitter google+ print"
	});
});
</script>

Services

By default, jquery.sharebox includes the following services :

License

Simply do what the fuck you want.

jquery.sharebox's People

Contributors

seebz avatar

Watchers

James Cloos avatar Tirapong Chaiyakun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.