Syntax error, unrecognized expression: [name = ctl00 $ MainContent $ mainProgress]

I am using jquery 1.3.2, but I updated it to the latest version:

The next version does not work with the latest version of jquery - what is going wrong here?

var input = $(this);

            // get the associated label using the input id
            var label = $('label[for=' + input.attr('id') + ']');

            //get type, for classname suffix 
            var inputType = (input.is('[type=checkbox]')) ? 'checkbox' : 'radio';

            // wrap the input + label in a div 
            $('<div class="custom-' + inputType + '"></div>').insertBefore(input).append(input, label);

            // find all inputs in this set using the shared name attribute
            var allInputs = $('input[name=' + input.attr('name') + ']');
+5
source share
1 answer

try changing the last line as follows:

var allInputs = $('input[name="' + input.attr('name') + '"]');
+10
source

All Articles