how to use text onclick to display images in javascript code example
Example 1: how to use text onclick to display images in javascript
$('img').click(function () {
if($(this).attr('id') == '1') {
$('#div').html('Image with 1 was clicked');
} else {
}
}
Example 2: how to use text onclick to display images in javascript
$('img').click(function () {
if($(this).attr('id') == '1') {
$('#div').html('Image with 1 was clicked');
} else {
}
}
Example 3: how to use text onclick to display images in javascript
$('img').click(function () {
if($(this).attr('id') == '1') {
$('#div').html('Image with 1 was clicked');
} else {
}
}