This is a migrated thread and some comments may be shown as answers.

PanelBar collapse not working after Jquery load

1 Answer 66 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 1
Rob asked on 27 Sep 2011, 05:31 PM
I am using MVC3 to populate a view, and the PanelBar collapses / expands as expected.

A timer has been added to rip out the old div containing the panelBar and replace it with a new one...

window.setInterval(handleEvent, 5000);

function callbackFunction() {
    alert('Reached');
    $('#PanelBar').tPanelBar({expandMode:1});
}

function handleEvent() {
   var theUrl = "@Url.Action("Nav","Nav")";
   $('#PanelBar').load(theUrl,callbackFunction);
}

But for some reason, it's no longer responding to collapse / expand clicks.  What am I missing?

Thanks,
Rob.

1 Answer, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 29 Sep 2011, 11:46 AM
Some additional information that I previously left out...

The PanelBar is originally loaded as a full page load, using the layout that contains the Telerik style sheet registrar and script registrar.

When I refresh the PanelBar using Jquery, I load the PanelBar as part of a partial view - without a layout specified, so I'm wondering whether I need to determine whether the PanelBar is being created with a full-page load or partial load, then perhaps adding the script registrar? Is that what would kick it back in to action? Or should I invoke a VisualBasic method that might already be loaded by Telerik?

Regards,
Rob.
Tags
PanelBar
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Share this question
or