Skip to main content
added 2 characters in body
Source Link
FernandoEscher
  • 3k
  • 3
  • 30
  • 27

You can also do this with jQuery in this way:

$(".c1 img").click(function(){
     $(this).attr(src=''src','/new/image/src.jpg');   
});

You can have a condition if there are multiple states for the image source.

You can also do this with jQuery in this way:

$(".c1 img").click(function(){
     $(this).attr(src='/new/image/src.jpg');   
});

You can have a condition if there are multiple states for the image source.

You can also do this with jQuery in this way:

$(".c1 img").click(function(){
     $(this).attr('src','/new/image/src.jpg');   
});

You can have a condition if there are multiple states for the image source.

deleted 20 characters in body
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

You can also do this too with JQueryjQuery in this way:

$(".c1 img").click(function(){
     $(this).attr(src='/new/image/src.jpg');   
});

You can have a condition if there are multiple states for the image source.

Take care you all.

You can do this too with JQuery this way:

$(".c1 img").click(function(){
     $(this).attr(src='/new/image/src.jpg');   
});

You can have a condition if there are multiple states for the image source.

Take care you all.

You can also do this with jQuery in this way:

$(".c1 img").click(function(){
     $(this).attr(src='/new/image/src.jpg');   
});

You can have a condition if there are multiple states for the image source.

Source Link
FernandoEscher
  • 3k
  • 3
  • 30
  • 27

You can do this too with JQuery this way:

$(".c1 img").click(function(){
     $(this).attr(src='/new/image/src.jpg');   
});

You can have a condition if there are multiple states for the image source.

Take care you all.