Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.ct-variable-carousel').on('slid.bs.carousel', function(){
  2.     var $this = $(this);
  3.     var $activeSlide = $this.find('.active');
  4.     var $id = $activeSlide.attr('data-variation-id');
  5.     var $price = $activeSlide.attr('data-regular-price');
  6.    
  7.     if($id){
  8.         $this.parent().find('a.variable_data_button').attr('href', '/?add-to-cart=' + $id);
  9.         $this.parent().find('span.woocommerce-Price-amount.amount').text($price);
  10.     }
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement