I have the following HTML code:
<a class="toggle" href="#toggle">
<img src="app/css/images/tock.png" alt="No" data-id="4" data-block="1">
</a>
I want to update the value of the src
and data-block
attributes using jQuery. How do I do this?
Update: As I have many image elements, I want to update the value of a specific image by using data-id
.