On Sat, Jan 3, 2009 at 4:36 PM,  <holandmij...@gmail.com> wrote:
>
> My question's are
>
>  1.  If you have a Div class= content with children anchors. Then
> empty and load in new content in that div with children anchor those
> anchors will get the same event handling that the previous anchors had
> right?

No (well, not exactly). Any click handlers you set on elements in that
div will not be bound to anything if you remove the content. This is
precisely what liveQuery deals with. It "watches" for new elements
which match the selectors given earlier for bind event handlers.



> 2 if it were a .click event to the div insted of the actual object how
> could you differentiate between a click on an anchor with a class of
> slider or an anchor with a class of dragable?

I don't understand the question. What "object"? The anchor *inside*
the div? You could use find('a') on the event target (the div) and
check the className.

> 3 and finally how would I find the ID of an <LI> that an object is a
> child of like in the channels div

$('#channels a').click(function(event)
{
        alert($(this).parent('li').attr('id'));
        event.preventDefault();
});

Reply via email to