Madura Harshana
Madura Harshana

Reputation: 1299

how to get and set tabindex in jquery

Im going to set tab index,

$("#DilutionFactor1_" + nCount).attr(
       'tabindex',
       $("#UnitOfMeasure" + nCount).attr('tabindex')+ 1) ;

but this is not working. Anyone can help me to solve this?

Upvotes: 4

Views: 24468

Answers (1)

Kanishka Panamaldeniya
Kanishka Panamaldeniya

Reputation: 17566

try to use parseInt

 $("#DilutionFactor1_" + nCount).attr('tabindex',
parseInt($("#UnitOfMeasure" + nCount).attr('tabindex'))+ 1) ;

Upvotes: 10

Related Questions