how could i get autofocus on next field after 2 digits?
Here is jquery which is not working for me -
$("#personalDetailMobilePhoneAreaInput").keyup(function () {
if (this.value.length == this.maxLength) {
$(this).next(':input').focus();
}
});
@Html.TextBoxFor(m => m.CommunicationView.MobilePhone.Area, new { @id = "personalDetailMobilePhoneAreaInput", @class="customText wdt80 numericValue",type = "text",maxlength="2" })
@Html.ValidationMessageFor(m => m.CommunicationView.MobilePhone.Area)
@Html.TextBoxFor(m => m.CommunicationView.MobilePhone.Number, new { @id = "personalDetailMobilePhoneNumberInput", @class="customText wdt120 mrglft10 phnIE numericValue",type = "text",maxlength="8" })
@Html.ValidationMessageFor(m => m.CommunicationView.MobilePhone.Number)