Suppose you have the following checkbox selected:
<input type='checkbox' id='stopNavAnim' />
You can determine if it is checked like this:
$('#stopNavAnim').is(':checked');
As for managing your specific animation, it really depends on how you #navigate your #navigate . You could just add
if ($('#stopNavAnim').is(':checked')) return;
to the places where the animation will be launched. If you are having problems with this, submit the code that you use for the animation.
A terrible jsbin example is available .
Another option would be to bind to the "change" event on the checkbox and call another function to stop / start the animation:
$('#stopNavAnim').bind('change', function() { if ($(this).is(':checked')) stopAnim(); else startAnim(); });
gnarf source share