sridhars711 / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Support for hover events #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Easy support for implementation of hover events.
(May as well only be a simple example that shows how to use the standard
jQuery technique)

Original issue reported on code.google.com by moo...@wwwendt.de on 12 Mar 2009 at 7:10

GoogleCodeExporter commented 9 years ago
$('#tree a').hover would bind it to every sinlge node, which is inefficient (it 
would
be better to use event delegation).
Also we would have to re-bind after lazy-nodes are expanded.

One improvement would be to add a success callback to the appendAjax() function 
to
allow postprocessing (rebinding) after the new nodes have been loaded.

Original comment by moo...@wwwendt.de on 14 Mar 2009 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 6 Jul 2009 at 3:36

GoogleCodeExporter commented 9 years ago
shoiuld be easy to do with issue 35

Original comment by moo...@wwwendt.de on 16 Feb 2010 at 9:19

GoogleCodeExporter commented 9 years ago
This can be done with standard jQuery:

$("#tree a").hover(function(){
        var node = $(this).parents("[dtnode]").attr("dtnode");
        logMsg("Hover in %s", node);
    }, function(){
        var node = $(this).parents("[dtnode]").attr("dtnode");
        logMsg("Hover out %s", node);
    });

Original comment by moo...@wwwendt.de on 6 Nov 2010 at 8:25