I would like one button to perform two jquery functions. One on the first click then the other on the second click. Here is the code for the two buttons. Is there a way to combine the functions?
<input type=\"button\" value=\"View Page\" onclick=\"ViewPage()\" />
<script type=\"text/javascript\">
function ViewPage() {
example_animate(\'-=50%\');
$(\"#mainContent\").toggle();
}
</script>
<input type=\"button\" value=\"View Menu\" onclick=\"ViewMenu()\" />
<script type=\"text/javascript\">
function ViewMenu() {
example_animate(\'+=50%\');
$(\"#mainContent\").toggle();
}
</script>





Rating:
The post jquery – one button one function on first click another on second appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/jquery-one-button-one-function-on-first-click-another-on-second.html
No comments:
Post a Comment