JQuery error: XML filter is applied to non-XML value (function (E, F) {return new (o.fn.init)(E, F);})

jquery, json

Solution

On the 4th line there's a `.` after `jQuery` that you should remove:

if(arg.ok) {
    $('.action-button').each(function() {
        $(this).removeClass('enabled');
    });
}

Which could be simplified to:

if(arg.ok) {
    $('.action-button').removeClass('enabled');
}

Problem

I am getting this slightly cryptic error message: XML filter is applied to non-XML value (function (E, F) {return new (o.fn.init)(E, F);}) when I run this code snippet ``` function justDoIt(arg){ msg = arg.msg; if(arg.ok) jQuery.(".action-button").each(function(idx,el){jQuery(this).removeClass('enabled');} ); } ``` arg is a JSON format response form the server. Anyone knows how to fix this?

Original source