[jQuery] How to know if it is a postback?
Hi,
I have a postback being called everytime a user click on the table
paging page.
This table resides in a <div> that being toggled (slidedown and up).
The problem i have is that, everytime the user clicks on the paging,
the table will go back to 'hide' on every clicks (this is the default
setting i set on page load).
How can i retain the state of the table on postbacks?? Please help.
Below are the codes.
================
$(document).ready(function() { //1st function to
execute after DOM loads
// Your code here
//Hide all the display outputs, unless user click
individually to view them.
$("#div_photo_media").hide(); //hide the table when
the page loads
//Show upload file accordion table
$("#a_photo_media").toggle(function() { //first function
to toggle
$("#div_photo_media").slideDown("slow");
$("#a_photo_media").html("Hide Media Photo");
return false;
}, function() { //second function to
toggle
$("#div_photo_media").slideUp("slow");
$("#a_photo_media").html("Show Media Photo");
return false;
});
});