observer pattern - Clone all 'observe' of a cloned element using Prototype -


i have sortable list (done using prototype , scriptaculous): can sort elements or drag them list.

when drop element (let's call element_1) of list 1 'clone' of dropped element , insert (appendchild) new list.

element1 had 'observe' (clicking on something, double-clicking on else) of course lost when cloning.. want cloned element have same 'observe' of element1.

how can that?

thanks in advance

observe lists instead of items , allow event bubbling work you.

$('list1','list2').invoke('on', 'click', 'li', function(event, element){     // "this" either list1 or list2     // "element" list item } 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -