// Change image depending on color
$('[name = "product_color"]').on('change', function() {
var colorValue = $(this).val();
$('.ba-slider__item img').
attr('src', 'img/headphones-' + colorValue + '.png');
});
Change image depending on color
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.