Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature - Select shareable blocks #3

Open
jjcarrancia opened this issue Mar 2, 2016 · 1 comment
Open

New feature - Select shareable blocks #3

jjcarrancia opened this issue Mar 2, 2016 · 1 comment

Comments

@jjcarrancia
Copy link

I've made a new feature, with my js file you can select what elements have the chance to share its content on twitter.

You can try it and get the code here: https://jsbin.com/xanabe/edit?js,output

texttweet.zip

@justmarkup
Copy link
Owner

Hi @jjcarrancia

thanks for the suggestion and your example. In your example you are using jQuery which I don't want to add as an dependency. I also wanted to have the option to be changeable, so I made a new version in the branch issue3.

Example
JavaScript Code

You can now define the blocks you want to be shareable:

var shareClass = '.shareable';
var shareButton = new TextTweet(shareClass);

If everything should be shareable you can use:

var shareButton = new TextTweet();

Would be great if you could test this and let me know if this works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants