Displaying 1 result from an estimated 1 matches for "divbefor".
Did you mean:
divbefore
2008 May 19
0
up/down/delete functions for list items, problem with bound parameters
...ind(pos);
div.appendChild(upf(div.id));
},
upArticle: function(pos) {
var before = this.FCArray[pos-1];
this.FCArray.splice(pos-1,1);
this.FCArray.splice(pos,0,before)
var div = $(''selected'').childElements()[pos];
div.id = pos-1;
var divBefore = div.previous().insert({before: div});
divBefore.id = pos;
}
)}
The user selects from some articles, which populates a ''selected''
list. Each of these gets an up/down/delete function. So, again, the
problem is that the POS argument is for ever bound to the created
el...