View Single Post
  #3  
Old 01-02-2019, 12:27 PM
 
rct rct is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 89
 

Default Re: How to display color name when swatch is chosen

Quote:
Originally Posted by qualiteam
You could use 'Custom JS', perfectly suits this task.
Found a script which might work , however I am not very sure which variable to use. Please help!

I put this in the colorswatch/controller.js


jQuery(function(){
$(".color-swatches input[type=radio]:").change(function(){
jQuery('.active-color').text($(".color-swatches input[name^="attribute_values"]:checked").val());
})
})

the following in colorswatch/body.twig
<span class ="active-color"></label>
__________________
JOHN - v.5.3.X biz, X-payment 3.X
Reply With Quote