Set focus on input using javascript or css on text input that is hidden until user selects an option

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

I am editing an existing form with inputs that are hidden until the user clicks on an option, and then text input will appear. I need to get that specific text input to have active focus once that happens. I would love to do this with CSS because I am not great with javascript, but here is a portion of that code:

if ($(“#frmSubmittedValue”).val() == ”) {
return false;
}

if ($(“#frmSubmittedValue”).val() == ‘Individual’)
$(“#personSubmittedByValue”).val(”);

if ($(“#frmProjectSub”).val() == 0) {
return false;
}

Any help is greatly appreciated!

‫أضف إجابة

تصفح
تصفح

مجهول يجيب