Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.ct-variable-carousel').on('slid.bs.carousel', function(){
- var $this = $(this);
- var $activeSlide = $this.find('.active');
- var $id = $activeSlide.attr('data-variation-id');
- var $price = $activeSlide.attr('data-regular-price');
- if($id){
- $this.parent().find('a.variable_data_button').attr('href', '/?add-to-cart=' + $id);
- $this.parent().find('span.woocommerce-Price-amount.amount').text($price);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement