GithubHelp home page GithubHelp logo

lancegliser / jquery-tweet-highlighted Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aterkik/jquery-tweet-highlighted

0.0 2.0 0.0 137 KB

A jQuery plugin that allows tweeting a user selected/highlighted text.

License: MIT License

HTML 30.05% JavaScript 69.95%

jquery-tweet-highlighted's Introduction

jquery-tweet-highlighted

A jQuery plugin that allows tweeting a user selected/highlighted text.

Installation

Include script after the jQuery library.

<script src="/path/to/jquery.tweetHighlighted.js"></script>

Usage

Simple usage:

$('body').tweetHighlighted();

Advanced usage:

Use any subset of the options below (all of the options are optional).

$('body').tweetHighlighted({
                             // html node to use as the 'Tweet' button
                             node: '<a href="#"><img src="tweet.png" width="90px" height="30px" alt="tweet icon"></a>',
                             // class attribute to attach to the node
                             cssClass: 'btn btn-primary',
                             // minimum length of selected text needed to show the 'Tweet' button
                             minLength: 6,
                             // maximum length of selected text after which the 'Tweet' button is not shown
                             maxLength: 144 * 2,
                             // any extra string to attach to every tweet (mostly used to attach urls)
                             extra: '-- http://github.com/aterkik/jquery-tweet-highlighted',
                             // twitter 'via' handle (basically appends 'via @twitterhandle' to the tweet)
                             via: 'twitterhandle',
                             // arguments to pass to the window.open() function
                             popupArgs: 'width=600,height=600,toolbar=0,location=0'
                          });

Contributing

Pull requests welcome!

jquery-tweet-highlighted's People

Contributors

aterkik avatar

Watchers

James Cloos avatar Lance Gliser 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.