Giter Site home page Giter Site logo

Comments (15)

pmb0 avatar pmb0 commented on June 26, 2024

What exactly are you using as data-services value?

from shariff.

CenkJaxon avatar CenkJaxon commented on June 26, 2024

data-services="["facebook","twitter","googleplus","mail","info"]"

from shariff.

CenkJaxon avatar CenkJaxon commented on June 26, 2024
data-services="["facebook","twitter","googleplus","mail","info"]"

from shariff.

pmb0 avatar pmb0 commented on June 26, 2024

This works for me:

<div class="shariff" data-services="[&quot;facebook&quot;,&quot;twitter&quot;,&quot;googleplus&quot;,&quot;mail&quot;,&quot;info&quot;]"></div>

from shariff.

CenkJaxon avatar CenkJaxon commented on June 26, 2024

Still same. When I view the source-code, I can see the entities not printed as &quot; but as " for example. May this be the reason?

from shariff.

CenkJaxon avatar CenkJaxon commented on June 26, 2024

2015-05-13 16_08_17-view-source_www zugeschnuert-shop de_gutscheintest

from shariff.

pmb0 avatar pmb0 commented on June 26, 2024

I assume the JS exception Uncaught TypeError: undefined is not a function in your structured_autocomplete.js:496 causes JS execution to stop.

from shariff.

pmb0 avatar pmb0 commented on June 26, 2024

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="[&quot;facebook&quot;,&quot;twitter&quot;,&quot;googleplus&quot;,&quot;mail&quot;,&quot;info&quot;]"></div>

from shariff.

CenkJaxon avatar CenkJaxon commented on June 26, 2024

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 :-/
2015-05-13 16_32_12-remote desktop manager free plentymarkets

from shariff.

pmb0 avatar pmb0 commented on June 26, 2024

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.

from shariff.

CenkJaxon avatar CenkJaxon commented on June 26, 2024

This worked. Thanks a lot Philipp.

from shariff.

pmb0 avatar pmb0 commented on June 26, 2024

👍

from shariff.

liayn avatar liayn commented on June 26, 2024

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)

from shariff.

CenkJaxon avatar CenkJaxon commented on June 26, 2024

Thx. Didn't know there is an extension for typo3.

from shariff.

liayn avatar liayn commented on June 26, 2024

;-) Yep, comes with full shariff-backend integration.
http://typo3.org/extensions/repository/view/rx_shariff

from shariff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.