Click here to Skip to main content
15,921,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi .
sorry . my english languge is not good!
i have a problem in jquery ! i have bottom script which make Collapsible div element
and works in master page . Because my pages has update panel therefore Occurs partial postback .i use
for rebind script.
when i click any button this solution work correctly but not save div last state for example i expand div and when Occurs page postback div close again!!
please help me !
<script language="javascript" type="text/javascript">
    //    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(collapsibleInit);
    function collapsibleInit() {
        var height1 = $("#<%=divContainerRecord.ClientID %>").height();

        $("#<%=pnlCommand.ClientID %>").toggle(function () {
            $("#<%=pnlCommand.ClientID %> span").text(">");
            $("#<%=divContainerRecord.ClientID %> .tblFormInfo").fadeIn('slow');
            $("#<%=divContainerRecord.ClientID %>").animate({ "height": height1+50}, 1000);

function () {
    $("#<%=pnlCommand.ClientID %> span").text("<");
    $("#<%=divContainerRecord.ClientID %> .tblFormInfo").fadeOut('slow');
    $("#<%=divContainerRecord.ClientID %>").animate({ "height": "0" }, 1000);

Updated 5-Feb-12 20:23pm
Sergey Alexandrovich Kryukov 6-Feb-12 2:08am    
I cannot see a question here...

1 solution

Sorry if I answer wrong question, but this is because the question is not clear at all (not even a question).

So, to answer just a question in the title, I would advise only one thing: pay attention for the Ajax methods of jQuery. Please see:[^].

Sorry if you you already knew all that and if my answer cannot help you. Perhaps you need to seriously revise your question and use "Improve question" in order to get better advice.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900