Bug Tracker

Opened 13 years ago

Closed 13 years ago

#5030 closed bug (worksforme)

problem with appendTo().end()

Reported by: fazzius Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


Does anyone experienced issue with those chained commands? Example: (not working) $("#space_b").find("img:not(.transfer)").appendTo(cell_toSwap).css('opacity', opacity[num] ).end().find("img.transfer").removeClass("transfer");

workaround: (separate statements)

$("#space_b").find("img:not(.transfer)").appendTo(cell_toSwap).css('opacity', opacity[num] ); $("#space_b").find("img.transfer").removeClass("transfer");

Change History (1)

comment:1 Changed 13 years ago by scottgonzalez

Resolution: worksforme
Status: newclosed

.appendTo() is a destructive operation, just like .find(). You need to .end() again in your chain to do what you want.

Note: See TracTickets for help on using tickets.