Bug Tracker

Modify

Ticket #6396 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

Live or children function bug

Reported by: bappy Owned by:
Priority: Milestone: 1.4.3
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocking: Blocked by:

Description

Bug: live action don't work but bind action works well with children. If you replace children with find function then it works well. $(document).ready(function(){ $('ul:first').children('li').live('click',function(){alert('work...')}); }

<ul> <li>test1</li> <li>test2</li> <li>test3</li> </ul>

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

Check the documentation for .live() -- it's not valid to use .live() in a chain like that.

This should work fine:

$('ul:first > li').live( ... )

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.