From an accordion panel, I post some data and then reload the page. I'd like on the reload for the current panel to be open and focused on the screen rather than re-opening the first panel and moving me back to the top of the screen. I know which panel I want open, so I don't need code to figure out the panel, just how to display it.
$.post('<%= ResolveUrl("~/Contract/AddContractLocation") %>', $(form).serialize(), function (data) {
if (data.Result == "success") {
... yada yada...
window.location.reload();
}
Edit to Add:
This is how I initialize the accordion:
$("#acc").accordion({
autoHeight: false,
navigation: true
});
This is the basic structure:
<fieldset>
<legend>Contract</legend>
<div id="acc">
<h3><a href="#contractinfo">Contract Info</a></h3>
<div>
stuff
</div>
<h3><a href="#locationandrs">Locations and Ratesheets</a></h3>
<div>
stuff
</div>
<h3><a href="#auditibleterms">Auditable Terms</a></h3>
<div>
stuff
</div>
<h3><a href="#contractdocs">Contract Docs</a></h3>
<div>
stuff
</div>
</div>
</fieldset>