hide, show and toggle functions in jQuery have optional callback function (used within the same parentheses), that allows to assign action after the effect is finished. For example, after something is shown or revealed, you may go to a URL or display a pop-up alert box.

Here’s an example:

<script type=”text/javascript”>
$(‘:submit’).click(function () {
function callback() {
alert(‘The toggle is finished’)