In my jquery, I am getting error
Uncaught TypeError: object is not a function
Here is the code:
var localValues = new Array('txtA', 'txtB', 'txtC');
for (var intCount = 0; intCount < localValues.length; intCount++) {
var control = $('#' + localValues(intCount)); /* ERROR */
validationOfControls(control);
}
function validationOfControls(control) {
// code here
}
It seems to be silly mistake, but I cant figure it out..
Can you please explain what I am doing wrong here?
Replace:
With:
The round brackets
()are used for function execution. Square brackets[]are used for array/object access.