I have the following code with the intention of locating values from within a targeted div as follows:
$('#combineDiv').children().each(function(){
if ($(this + ":first-child").attr('class') == 'combinedColumn') {
alert('found ONE!');
}
});
I have a hidden input in some of the divs within the children of the div ‘#combineDiv’… but, I dont know how to combine the ‘THIS’ keyword with the appropriate selector… 🙁
remember
thisis going to return an object from the DOM, so$(this + ":first-child")probably isn’t going to give you what you want (it’ll probably return something like [object Object]:first-child.Instead try accessing the ID, or whatever it is you’re after, off of that
thisobject$(this.ID + “:first-child”).attr(‘class’)