if ($("form").valid()) causes IE script error message, why?

if ($("form").valid()) causes IE script error message, why?

I'm using the latest JQuery Validator plugin.  My submit button is actually a link with a class of "activitySubmitLink", therefore I use the following code to submit a form.

$('.activitySubmitLink').livequery('click', function() {
    if ($("form").valid()) {    
        $('form').ajaxSubmit(...);
    }
});




Even though this works and prevents form submission when form is invalid, IE 7 and 8 gives an error that says "Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive." Firefox and other browsers are fine, no errors like that one.

I've also tried calling the validate() function prior to test with .valid(), but no luck.

$('.activitySubmitLink').livequery('click', function() {  
   $("form").validate();
    if ($("form").valid()) {    
        $('form').ajaxSubmit(...);
    }
});




Has anyone come accross this problem? Your help is appreciated!