I am trying to pass multiple numbers for objects for a certain class. here a preview of the piece I am trying to work on
group: function(number) {
for(var i=0;i<number.length;i++){
groups=number[i];
$('.group')[groups].remove();
}
}
I am trying to make it so its like
code.destroy.group(0,1,2);
What this will do will remove $('.group')[0]
$('.group')[1]
and $('.group')[2]
I have to be doing this wrong or else this would be working correctly. Can someone lead me on the right path here.
Thanks to Felix King for leading me to the right path:
All I had to do is use the arguments parameter
group: function() {
for(var i=0;i<arguments.length;i++){
$('.sceditor-group')[arguments[i]].remove();
}
}