简体   繁体   中英

PrestaShop: How to fix a social share toggle that open in automatic in all products

I entered a toggle for social sharing in the /miniatures/product.tpl but if I click it, it works only in the first product of the page, not in a random single one I want. I tried to fix it changing the .js but in the second way it opens in all products at the same time!

Is there a way to open it in every single product one by one?

I'm using this toggle

You should try this :

$(document).ready(function(){
    $('#s-icons').click(function() {
        $(this).children('.navbar-nav').toggleClass("show");
    });
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM