Skip to content

Instantly share code, notes, and snippets.

Created Sep 12, 2020
What would you like to do?
<script type="text/javascript">
require(['jquery', 'cookie'], function($) {
$(document).ready(function() {
if ($("body").hasClass("page-products")) {
//si l'user click sur la photo, creer un cookie
$('.product-item-info').each(function() {
$(this).click(function() {
var moupe = $(this).find('.swatch-option.color.selected');
var tangoyi = moupe.attr("id");
var choixdelutilisateur = $.cookie('choixdelutilisateur', tangoyi);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment