onBeforeSelect

fires before an item is selected, cancelable

boolean onBeforeSelect(string id,string lastId){ ... };

Parameters

idstringid of the item to select
lastIdstringid of the previously selected item, if any

Returns

booleantrue|false to allow/cancel selection

Example

mySidebar.attachEvent("onBeforeSelect", function(id, lastId){
    // your code here
    return true;
});

Related samples

Details

return true|false to allow/cancel selection

Back to top