Jquery Double clicking on link removing div content
- by ram
I wrote this code to load the content of a DIV ,when some one clicks on a link.
Now,if you click on a link twice,it is removing the content.
Here is the code
$('a').click(function() {
var id = $(this).attr('class');
if(id == 'first')
{
$('.active').removeClass('active');
$('a.first').addClass('active');
}
else…