views:

12

answers:

1

Hello everyone,

I have a menu which contains a delete button to delete items from it. I put all inside an updatepanel to make partial postbacks. The problem is after i made the post back the jquery jdmenu pluggin stops work. I suppose i should include something like this

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(InitializeJdMenuAgain);

function InitializeJdMenuAgain(sender, args) {
  //do something here which i am not sure
}

but i am not sure what should i put in InitializeJdMenuAgain because no script is needed when using this pluggin. I was inspecting the code for pluging but i don't have too much abilities which Javascript, what i need to do?

thanks in advance.

A: 

You should reattach the menu to the DOM element that was updated by the UpdatePanel:

function InitializeJdMenuAgain(sender, args) {
    $('ul.jd_menu').jdMenu();
}
Darin Dimitrov