I have come across a problem trying to pass some objects to a java function. I am using a jquery .each loop. My code is as follows:
$('.overme').each(function () {
grow($(this).parent().find("#txtInput"), $(this).parent().find("#txtInputa"));
...
The grow function is as follows:
function grow (one, two) {
var colsDefault = one.cols;
var rowsDefault = one.rows;
colsDefault.style.width;
...
Unfortunately I am not getting any object data. Where i’m I going wrong?
The Jquery Selector returns a Jquery Object and not the DOM-Element. If you want the element itself you can use
$(this).parent().find("#txtInput")[0]