I have some code to fade in a message to the user in certain scenarios. This one ASPX page does a postback, and clears the page with success or failure based on fields filled out by the user.
I KNOW I’ll probably start a huge war, on how I should be checking the DOM instead of the browser for the existence of mozilla. That’s fine, I get that. But I just want to run the fadeIn() one time, when the page is created on the initial load.
if ($.browser.mozilla != true) {
$("#dim").fadeIn();
}
I’m like on day three of jQuery here, so I’ve done some searches but not finding what I’m trying to do.
Thanks.
You can use hidden field to keep the state of postback and use that hidden field before running the javascript code.
In html
In code behind
In javascript