Is there a way to use create and at the new model at the beginn of the collection instead of appending it at the end?
Is there a way to use create and at the new model at the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Backbone delegates the insertion to
Collection.addwhich means you can pass an at option to specify the position:will yield
[4,1,2,3]And a Fiddle http://jsfiddle.net/nikoshr/p6fNR/