Bug Tracker

Modify

Ticket #3999 (closed enhancement: fixed)

Opened 4 years ago

Last modified 14 months ago

toArray()

Reported by: rkatic Owned by:
Priority: major Milestone: 1.4
Component: unfiled Version: 1.3.1
Keywords: Cc:
Blocking: Blocked by:

Description

An more explicit way to get an array from a jQuery object.

toArray( [start [,end]] )

jQuery.fn.toArray = Array.prototype.slice;

Also consider to make .get() deprecated in favor of .toArray() and .get(index) deprecated in favor of [index].

 Discussion about this ticket

Change History

comment:1 in reply to: ↑ description Changed 4 years ago by rkatic

Despite the above implementation gives the ability to use toArray like an slice it is not recommended to expose this like an feature. Documenting it with "toArray()" insted of "toArray( [start [,end]] )" would be enough.

According on the discussion, .get(n) would not be deprecated.

comment:2 Changed 4 years ago by yehuda

  • Milestone changed from 1.3.2 to 1.3.3

comment:3 Changed 4 years ago by yehuda

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

Resolved by #6438

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.