hey Guys I wrote the plugin pretty nice I have an example http://pedramtech.com/Development/jqueryPlugins/ $.fn.ClosestChildren = function(expr) { var $t = $(this); return $t.is(expr) ? $t : $t.find(expr).eq(0); };
jQuery("ul.u-first").bind("mouseover mouseout",function(event){ console.log(event.target); $(event.target).TraverseDown("ul"); if(event.type == "mouseout" )$(event.target).TraverseDown ("ul").removeClass("green"); else $(event.target).TraverseDown("ul").addClass("green"); }); this example finds the closest UL in the Ul.ui-first descendants and does some action with it , I used Event Delegation. On Dec 18, 10:39 am, Pedram <pedram...@gmail.com> wrote: > I would like to have Traverse Down and It self Traversing function in > jQUery how can I make that > as you all know we have Closest which is traversing up and includes it > self... > > this is what I have > $(event.target).find('> a:not(.active)'); > the problem occurs when the event.target is the actual link . > so any one has an idea an, thanks !!!