Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14431 closed bug (notabug)

Iterator variable passed as reference?

Reported by: Kindzoku Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:

Description

http://jsfiddle.net/zFfV8/ Hi. Just tried to write pager for my widget and have found this. Sorry in advance, in case this is right behaviour.

Change History (1)

comment:1 Changed 9 years ago by Rick Waldron

Resolution: notabug
Status: newclosed

The value is not passed as a reference—it's a primitive. This is not a jQuery bug and it's how JavaScript for-loop vars work. Use jQuery.each to get a properly scoped "i": http://jsfiddle.net/rwaldron/5EuxG/

Note: See TracTickets for help on using tickets.