kunal kunal - 26 days ago 9
jQuery Question

SyntaxError: missing ) after argument list var x = $("input[name="+value+'[]'"]")

I am getting error on this. i don't know what happen here.

enter code here
$(".addCategory").on('click',function(){
var value= $(".getvalue").val();
var x = $("input[name="+value+'[]'"]")
$(x).each(function(key,val){
if($(val).val().length<=0)
{
alert ("Please fill all the fileds");

}

});
});

KAD KAD
Answer

You have problem with quotes

   var x = $("input[name='" + value + "[]']")