Created
September 12, 2020 22:19
-
-
Save jhouedanou/c236c2166d39087535e32348421d7bd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"); | |
//console.log(tangoyi); | |
var choixdelutilisateur = $.cookie('choixdelutilisateur', tangoyi); | |
//console.log(choixdelutilisateur); | |
}); | |
}); | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment