Page change clears up all events attached to the row elements.

Page change clears up all events attached to the row elements.

devpriyadevpriya Posts: 8Questions: 0Answers: 0
edited December 2011 in General
I am calling the create menu function inside the draw callback and this function binds click event to all the elements having class "menu"

[code]
"fnDrawCallback": function()
{
createMenu();
}

function createMenu()
{
$(".menu").click(function(){
//do something
});
}
[/code]

My menu works fine initially but then if I go to any other page and come back to page 1, the click has no effect now. This happens with any page, I visit it the first time and the click works fine but if I change page and come back again, the click doesn't work anymore.

Strangely when single click stops working, double click works!!

My other config options are -

[code]
"bAutoWidth": false,
"bDestroy": true,
"bProcessing": true,
"bJQueryUI": true,
"aaSorting": [[ 6, "desc" ]],
"bDeferRender": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
[/code]
This discussion has been closed.