My view like this :
<li id="thumbnail-view" class="count-photo">
<div class="thumbnail">
<img src="{{ asset('img/thumbs/'.$photo) }}" alt="">
<a href="javascript:" class="thumbnail-check"><span class="fa fa-check-circle"></span></a>
<ul class="list-inline list-edit">
...
</ul>
</div>
</li>
My javascript like this :
var photo = 'flower.jpg';
var res = `<img src="{{ asset('img/thumbs/'+photo) }}" alt="">`
$('#thumbnail-view img').html(res);
If the javascript code executed, I want to change the image
I try like that, but it does not work
How can I do it?
.attr("src", "linkhere")attr. Its a jquery function. You can set or get any attribute of a selected element.