Front End Programmer Question:
Download Questions 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>

Front End Developer Interview Question
Front End Developer Interview Question

Answer:

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

Download Front End Developer Interview Questions And Answers PDF

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?