How to set jQuery custom attribute value as Integer instead of String. I would like to set the tabindex value dynamically using jQuery.
<input tabindex=1 />
var allInputs = new Array();
$(':input').each(
function() {
allInputs.push($(this));
}
);
$.each(allInputs, function (i) {
var indexNumber = i + 1;
$(this).attr('tabindex', indexNumber );
});
This code sets an value as a String within "".
e.g <input tabindex="1" />
Is there any other ways to set the value as an Integer so It will be
<input tabindex=1 />
/Jivan