Closed CenkJaxon closed 9 years ago
What exactly are you using as data-services value?
data-services="["facebook","twitter","googleplus","mail","info"]"
data-services="["facebook","twitter","googleplus","mail","info"]"
This works for me:
<div class="shariff" data-services="["facebook","twitter","googleplus","mail","info"]"></div>
Still same. When I view the source-code, I can see the entities not printed as "
but as "
for example. May this be the reason?
I assume the JS exception Uncaught TypeError: undefined is not a function
in your structured_autocomplete.js:496
causes JS execution to stop.
No, I was wrong. I inspected your html markup. Your shariff element doesn't contain the data-services value as described above:
<h4>Weitersagen</h4>
<div class="shariff" data-services="[\/facebook,twitter,googleplus,mail,info]"></div>
versus
<h4>Weitersagen</h4>
<div class="shariff" data-services="["facebook","twitter","googleplus","mail","info"]"></div>
Yeah, like I asked before: You caught me trying to use escapes to get these entities work correctly. Somehow the template engine seems to interprete them :-/
If you cannot fix this behavior, you can initialize Shariff in your own JS code.
var $shariff = $("<div>");
new Shariff($shariff, {services: ["twitter", "googleplus"]});
$shariff.appendTo("#share");
This code needs to run after your <script src="shariff.min.js">
line.
This worked. Thanks a lot Philipp.
👍
Don't know which template engine you're using, but with TYPO3 Fluid you have to use this syntax:
<rx:shariff data="{url: 'http://example.com/', services: '[\"whatsapp\",\"facebook\"]'}" />
(The example is using the viewhelper of the rx_shariff extension for TYPO3 CMS)
Thx. Didn't know there is an extension for typo3.
;-) Yep, comes with full shariff-backend integration. http://typo3.org/extensions/repository/view/rx_shariff
Hi, I try to use Shariff w/o Backend which works with
<div class="shariff clear"></div>
. But as soon as I add the data-services tag to customize the buttons it disappears at the front-end. What might be the reason? Btw. I'm using shariff.min.js and shariff.complete.css.