Thanks for your input, everyone. Much appreciated. :)
Joel.
On 6 syys, 15:50, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> You should be able to do that using event.target. Try this:
>
> $('ul').one('click', function(event) {
>if ( !$(event.target).is('a') ) {
> // your code here
>}
> });
This is normal bubbling and should be used more :)
But
Hey Joel,
You should be able to do that using event.target. Try this:
$('ul').one('click', function(event) {
if ( !$(event.target).is('a') ) {
// your code here
}
});
Untested, but should work.
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On S
It's because of the direction of bubbling. You can't capture the event
on the way "down" the parents to the children. You can only capture it
on the way "back up", from children to parents. So your event will hit
the child (link) before the parent (list).
Technically you could capture it on the t
4 matches
Mail list logo