Front End Programmer Question: Download Front End Developer PDF

Using jQuery how would you hide the image when the user clicks it for the following code snippet?

<div class="content">
<p>Some Content Here</p>
<p class="loader"><img src="ajax-loader.gif"></p>
</div>

Tweet Share WhatsApp

Answer:

$(document).ready(function(){
$('.loader img').click(function() {
$('.loader img').hide();
$('.loader img').hide();
});
});

Download Front End Developer PDF Read All 67 Front End Developer Questions
Previous QuestionNext Question
Do you know what is a sprite? How is it applied using CSS? What is the benefit?How to increase page performance?