javascript - Passing parameter from array loop to init function -


i using prototype 1.7 , trying init sortable.create() passing parameter array, without success.

here 100% working code.

sortable.create('ordable_list_30'); sortable.create('ordable_list_43'); 

"ordable_list_30" id, it's depends form, can have more 2 ids, collect id's that

var sortables = $$('[id^="ordable_list_"]');    var new_array = [];    sortables.each(function (id) {   new_array.push(id.id);   });    (var i=0; i<new_array.length; i++) {   sortable.create(new_array[i]);   console.log(new_array[i]);   } 

in console log-a have new_attay[i] ids want, function can't init, don't have error.

some suggestions ?


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -