I have a page slider, each slide has a separate article. For each article its own block with sharing. Is it possible to hang up creating a new block by passing the class name instead of id argument? Because otherwise, you will have to create a new id each time and access it. Now when accessing through the class name I get an error:
this.initSocshare = function(el, services) { new Ya.share2(el, { content: { url: 'https://yandex.com', title: 'Yandex', theme: { services: services } } }); } And acc. I call:
initSocshare('.socshare_b-container', 'facebook,twitter,vkontakte,gplus'); Here is the mistake:
Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': '#.socshare_b-container' is not a valid selector. I tried to call and with a point and without.