The onclick doesn't work when the javascript returns false. I need javascript to return false in order to animate the button. If I return true then the onClick works but the animation doesn't work. I have tried doing __doPostBack and UseSubmitBehaviour but nothing seems to work. Any help would be really appreciated on how to fix this.
Code for asp button:
<asp:LinkButton id="btn_salaries" onClientClick="return fncsave();" OnClick="btn_clicked" UseSubmitBehavior="false" runat="server" type="button" class="list-group-item" Text="getCharitySalaries"/>
Javascript code:
function fncsave(){
$(document).ready(function(){
$("#list").click(function(){
$("#list_of_btns").animate({left: '-290px'});
});
});
return false;
}
Update:
I'm doing the animation in ajax but I don't know if I'm doing this correctly because it does not perform the animation.
This is my code below:
function fncsave(){
alert("dsfdsf");
$(document).ready(function(){
$(document).ajaxStart(function(){
$("#list_of_btns").animate({left: '-290px'});
}
}
return true;
}