-
Notifications
You must be signed in to change notification settings - Fork 177
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
Shariff class not callable lately #34
Comments
Let me see if I understood your question. You replaced the old socialshare-privacy code with Shariff. The socialshare-privacy documentation recommended using the script tag inside the In contrast to that, Shariff must be included right before the (closing) |
Yes,
Solution could be:
|
Embedding Shariff is difficult in your situation (not a node project, no Try something like this: <head>
$(function() {
$("#socialshare").addClass("shariff");
$.getScript("/path/to/shariff.js");
});
</head> In my opinion modifying the HTML document is the best option. |
We had a problem using this too recently. Our project was also not a node project. We had need to initialize the shariff code after it was loaded on to the page, to allow for later ajax'd content to include the sharing functionality. The way we fixed this was to assign the _Shariff function to the window object. This allowed us to call as and when we needed. Is this something you could add to this project to allow the plugin to be used in this way as well? |
Just pushed a change that renames 27cd300#diff-f9e06b21d8f4ff0e3fd8301ee954ec47R236 This example html page shows how to initialize shariff after it was loaded: https://github.com/heiseonline/shariff/blob/master/demo/custom-initialization.html The change is not released yet. |
Looks great. Any idea when this might be released? |
Today or tomorrow. |
Perfect. Thanks for the update. |
Just released v1.9.1. |
Our pages include as a tag
<div id="socialshare"></div>
(from former socialshare-privacy plugin).Before we could use after dom-ready a javascript-call:
Now all is encapsulated as anonymous functions.
How we can call it now at a later like any othe jquery-plugin
Not working was the initial code:
How we can call the _Shariff function from extern javascript in a normal html-page (not a node-app)?
The text was updated successfully, but these errors were encountered: