-
Notifications
You must be signed in to change notification settings - Fork 16
3. JavaScript API
Adam Chambers edited this page Jun 1, 2016
·
14 revisions
You can use the last word from all the data attributes in the data attributes API as Share options in the JS API.
new OpenShare.share(options, element)
Property | Value |
---|---|
type |
Name of the service. e.g. 'Twitter', 'Facebook', 'Github', etc.. |
url |
URL being shared. |
bindClick |
Boolean. Set true to allow Share Node to share when clicked. |
appendTo |
Element to append the Share Node to. |
innerHTML |
Sets a string as innerHtml to the Share Node. |
element |
Element to create the Share Node as. |
classes |
An array of classes to be added to the Share Node. |
You can use the last word from all the data attributes in the data attributes API as Share options in the JS API.
new OpenShare.count(options, element)
Property | Value |
---|---|
type |
The service to get a count from. |
url |
URL to get a count from. |
element |
Element to create a count node of. (Default: <span> ) |
classes |
Array of classes to give the count node. |
appendTo |
Element to append the count node to. |