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

Allow html inside social tags, by merging the data set by data-title with the existing innerHtml content. #134

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
jQuery Sharrre Plugin
===
# jQuery Sharrre Plugin

Make your sharing widget!
Sharrre is a jQuery plugin that allows you to create nice widgets sharing for Facebook, Twitter, Google Plus (with PHP script) and more.
More information on [Sharrre] (http://sharrre.com/#demos)

Usage
===

$('#sharrre').sharrre({
### 1. Usage
```
$('#sharrre').sharrre({
share: {
googlePlus: true,
facebook: true,
twitter: true
},
url: 'http://sharrre.com'
});
```

### 2. Dependencies
* JQuery (http://jquery.com)

### 3. Configuration

Example
===

```
<div id="demo1" data-title="sharrre" data-url="http://sharrre.com" ></div>
$(document).ready(function(){
$('#demo1').sharrre({
Expand All @@ -43,18 +44,12 @@ Example
}
});
});

```
See example on [official website] (http://sharrre.com/#demos)


Dependencies
===

jQuery 1.7

Author
===
### 4. Credits

- [Julien Hany](http://hany.fr)
- [Twitter (@_JulienH)](http://twitter.com/_JulienH)
- [Google+](http://plus.google.com/111637545317893682325)
* **Original author:** [Julien Hany](http://hany.fr)
* **Modifications by:** [Nil Portugués Calderó](http://nilportugues.com)
3 changes: 2 additions & 1 deletion jquery.sharrre.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,10 @@
$(this.element).html(template);
}
else{ //template by defaults
current = $(this.element).html();
$(this.element).html(
'<div class="box"><a class="count" href="#">' + total + '</a>' +
(this.options.title !== '' ? '<a class="share" href="#">' + this.options.title + '</a>' : '') +
(this.options.title !== '' ? '<a class="share" href="#">' + current + this.options.title + '</a>' : '') +
'</div>'
);
}
Expand Down