Q:

Repeating the click animation in jquery

I am using jquery to display text when clicked on a state with some animation. The problem is the animation effect is running only for the first time the state is clicked and not on the second time. The code is as follows:
$("#maharashtra").live("click",function(){

    $("#mainbg").hide();
    $("#divmaha").animate({left:"700px"});
    $("#divmaha").show() ;
    $("#divguj").hide();
    $("#divgoa").hide();
    $("#divkerala").hide();
    $("#divassam").hide();
    $("#divmeghalaya").hide();
    $("#divarunachal").hide();

    $("#divmizoram").hide();
    $("#divkarnataka").hide();
    $("#divandhra").hide();
    $("#divtamilnadu").hide();
    $("#divraj").hide();
    $("#divjammu").hide();
    $("#divuttaranchal").hide();
    $("#divhp").hide();
    $("#divharyana").hide();
    $("#divpunjab").hide();
    $("#divdelhi").hide();
    $("#divmadhya").hide();
    $("#divjharkhand").hide();
    $("#divchattisgarh").hide();
    $("#divup").hide();
    $("#divorissa").hide();
    $("#divbihar").hide();
    $("#divwestbengal").hide();
    $("#divsikkim").hide();
    $("#divtripura").hide();
    $("#divnagaland").hide();

});

A:

That's because your animation has already been performed. Now, introduce a "Reset" button and add reverse of everything in the animation so it moves back to its original place. Now again whenever someone would click that animate button, it'll animate.
Btw, you can compress this code. Combine the selectors and separate them with comma.

