2
$('document').delegate('.seeMore a', "click", function() {
    var $allTabs = $(this).closest('.globalTabs').find('.allTabs');
    $allTabs.slideDown('slow'); 
});

The DOM elements are:

<div class="globalTabs">
    <ul>
        <li>
            <a>some link</a>
        </li>
        <li>
            <a>some link</a>
        </li>
        <li class="seeMore">
            <a>some link</a>
        </li>
    </ul>
    <div class="tabContent">
        some content
    </div>
    <div class="allTabs">
        mutliple links
    </div>
</div>

the above function is in an .each - so for each .globalTabs this function should run.

But it seems to not be finding the elements at all, even when there is only one on the page, the seeMore a doesn't have any events tied to it (using visual event to determine).

Thoughts?

(I should mention that bind works, but live does not).

GG.
  • 21,083
  • 14
  • 84
  • 130
Jason
  • 7,612
  • 14
  • 77
  • 127

1 Answers1

4

There is no need in quotes for document in the first selector:

// v------v-------- 'document' should be an object, not a string
 $(document).delegate(".seeMore a", "click", function() { ... });
VisioN
  • 143,310
  • 32
  • 282
  • 281