Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jquery

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

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

var input = $(this);

            // get the associated label using the input's 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') + ']');
like image 282
user1177860 Avatar asked Jul 30 '12 13:07

user1177860


1 Answers

try changing the last line to this:

var allInputs = $('input[name="' + input.attr('name') + '"]');
like image 176
Yngve B-Nilsen Avatar answered Nov 14 '22 23:11

Yngve B-Nilsen