Answers for "javascript get element by id change img src -"jquery""

3

change image src jquery

$(document).ready(function () {
    $('img').click(function(){
        $(this).attr('src','images/download.jpeg')
      })
})
Posted by: Guest on April-26-2020
0

change image src using jquery

//img is the attribute tag you can use #id if you want 
$("img").click(function () {
                    // Change src attribute of image
                    $(this).attr("src", "images/card-front.jpg");
                });
Posted by: Guest on December-04-2020

Code answers related to "javascript get element by id change img src -"jquery""

Code answers related to "Javascript"

Browse Popular Code Answers by Language