Input
<input type="text" value="" id="row1">
<input type="text" value="" id="row2">
Need to get last character from row and pass it to javascript variable. Here is row1 and row2, need to get variables 1 and 2
I try to use this, but does not work
$('[id^="row"]').each(function (index, row) {
var row = row.id.substring(3);
alert (row);//this is only to check if value exists (alert or not)
});
No alert at all. But need: on first iteration (.each) var row is 1, on second, - 2, etc.
Used this as example. The example works, but my code not
$.each([52, 97], function(index, value) {
alert(index + ': ' + value);
});
jquerytag...