In jquery, we can change the src of an image by click. I don’t know how to do it in Alpine js.
$("#thumbnail").on(‘click’, function(){
$("#main img").attr(‘src’, ‘main.jpg’ );
})
In jquery, we can change the src of an image by click. I don’t know how to do it in Alpine js.
$("#thumbnail").on(‘click’, function(){
$("#main img").attr(‘src’, ‘main.jpg’ );
})