tags:

views:

22

answers:

0

I have been using jquery hide() and html() function a lot. Lately, I have been noticing some weird behaviors on IE8 in compatibility mode.

Say, I submit a form via $.ajax({ ... }). Before the submission, I display a "saving, wait!" message and hide the button. On success i clear this message and display the "save" button again.

My problem is the message won't appear even if the submit button is clicked. The funny thing is it looks like as if the button is not clicked at all. However, everything works fine in the back end as expected, as in the records are created in my dB.

Even worse, this doesn't happen regularly which makes it hard for me to debug.

Of course, everything works perfectly fine in FireFox. No errors in firebug either.

I came across some sites suggesting using .css('display','none') instead of hide(). any ideas?

thanks