<div class="form-group">
<label class="control-label" for="test1"></label>
<input type="text" name="test1" class="form-control test1" id="test1" placeholder="" width="200">
</div>
For add class for div <div class="form-group">
i use code:
var FindName = arr[i].name; //test1
$("input[name=FindName]").parent().removeClass("test").addClass("test2");
But code isnt working. Tell me please where error in my code?