javascript - Onclick change image source in another div using jQuery -
i have 3 small divs, when click on i'd popuplate larger div @ top of page, issue can't working @ , i've no idea why.
im trying update
$('.highlight-image').on('click', function (e) { console.log('clicked'); var currimg = $(this).find('.imageholder').children('img').attr('src'); var currp = $(this).find('blockquote').text; var targetimg = $('.featuredtestimonial img'); var targetname = $('.featuredtestimonial h2'); var targetp = $('.featuredtestimonial p'); $('.featuredtestimonial p').text = currp; $('.featuredtestimonial img').attr('src'); = currimg; });
change
$('.featuredtestimonial img').attr('src'); = currimg;
to
$('.featuredtestimonial img').attr('src', currimg);
Comments
Post a Comment