I have some difficulties with this. In Backbone, I have a function like this:
functionOne: function(){
$('#myTExtbox-' + budgetLine.attr('id')).on('change keyup paste', function(){
that.mySecondFunction(this);
});
}
In this case, thisis textboxthat which is in table, inside a div. Then:
mySecondFunction: function(tb){
var tbody = tb.parentElement.parentElement.parentElement.parentElement.parentElement;
}
Then I want to iterate through tbodyto go through each line and find textboxin a specific cell. The problem is that this code:
$.each(tbody, function(index, item){
cost = item;
var t= index;
});
I don't seem to be able to get to any items. In this example, if I try to do something like:
item.getElementById('test');
I get an error message:
TypeError: Object #<HTMLCollection> has no method 'getElementById'
Why can't I iterate over this object and access the objects inside?
thank
UPDATE
Here's the script: http://jsfiddle.net/HX8RL/14/
, : tb Tb. tb , , , tb.