- add tmp effect on products
This commit is contained in:
parent
0758e90ffb
commit
d43e936620
1 changed files with 11 additions and 3 deletions
|
|
@ -9,14 +9,14 @@
|
|||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
|
||||
$hero=get_field('img-hero');
|
||||
|
||||
$tabGammes=[];
|
||||
$tabProducts=[];
|
||||
$terms = get_terms('gamme');
|
||||
|
||||
foreach($terms as $key => $term) {
|
||||
foreach($terms as $key => $term) {
|
||||
$tabGammes[$key]['data']=$term;
|
||||
$args = array(
|
||||
'post_type' => 'produit',
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="caracteristiques">
|
||||
<div class="caracteristiques tax-<?= $value['data']->term_id; ?>-caracteristiques animate__flip">
|
||||
<div class="product-name">
|
||||
<p class="p-title-<?= $value['data']->term_id; ?>"><?= get_field('prod-title',$value['posts'][0]->ID); ?></p>
|
||||
</div>
|
||||
|
|
@ -155,6 +155,9 @@
|
|||
$("#tax-"+taxId+">li>a.clicked").removeClass("clicked");
|
||||
$(this).addClass('clicked');
|
||||
var itemProd = productsTab.find(itemProd => itemProd.id === parseInt(postId));
|
||||
|
||||
$(".tax-"+taxId+"-caracteristiques").addClass('animate__animated');
|
||||
|
||||
$('.p-title-'+itemProd['taxonomy']).html(itemProd['title']);
|
||||
$('.p-description-'+itemProd['taxonomy']).html(itemProd['description']);
|
||||
$('.p-advices-'+itemProd['taxonomy']).html(itemProd['advices']);
|
||||
|
|
@ -163,6 +166,11 @@
|
|||
$('.picto-prod-'+itemProd['taxonomy']).each(function(index) {
|
||||
$(this).attr('src',itemProd['pictos'][index]);
|
||||
});
|
||||
|
||||
setTimeout(function(){
|
||||
$(".tax-"+taxId+"-caracteristiques").removeClass('animate__animated');
|
||||
}, 1000);
|
||||
|
||||
// console.log(productsTab);
|
||||
// console.log(itemProd['id']);
|
||||
// console.log(itemProd['taxonomy']);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue