Side navigation
#51 closed bug (fixed)
Opened July 07, 2006 09:42PM UTC
Closed November 17, 2006 11:54PM UTC
Issue with Arrays
| Reported by: | neytema@gmail.com | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | |
| Component: | ajax | Version: | |
| Keywords: | Janice | Cc: | Janice |
| Blocked by: | Blocking: |
Description
Testcase:
alert($([['a', 'b']]).length);
alert($([['a', 'b']]).get().length);
Fix at line 106 $Rev: 133 $:
[].push.apply( this, $.map( num, "a" ) );
Attachments (0)
Change History (5)
Changed July 08, 2006 05:37PM UTC by comment:1
| milestone: | → 1.0 |
|---|---|
| version: | → 1.0 |
Changed July 18, 2006 04:44AM UTC by comment:2
| resolution: | → invalid |
|---|---|
| status: | new → closed |
Changed October 26, 2006 02:24PM UTC by comment:3
| component: | → ajax |
|---|---|
| priority: | → blocker |
| resolution: | → invalid |
| status: | reopened → closed |
| type: | → bug |
SPAMPOLICE
Changed November 05, 2006 08:12PM UTC by comment:4
| cc: | "" → Janice |
|---|---|
| component: | ajax → 1 |
| keywords: | "" → Janice |
| milestone: | → 1 |
| priority: | blocker → 1 |
| summary: | $([['a', 'b']]).length → Janice |
| type: | bug → 1 |
| version: | → 1 |
Changed November 17, 2006 11:54PM UTC by comment:5
| component: | → ajax |
|---|---|
| priority: | → blocker |
| resolution: | → fixed |
| status: | reopened → closed |
| summary: | Janice → Issue with Arrays |
| type: | → bug |
Umm.. well, considering that $([['a', 'b']]) isn't a valid argument, I'm not really surprised that it's failing. A proper one would be something like:
<pre>var foo = document.getElementById("foo");
var bar = document.getElementById("bar");
$([ foo, bar ]).hide();</pre>
Since jQuery neither accepts arrays-of-arrays OR arrays of expressions, what you provided won't work.