tags:

views:

572

answers:

2

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?

+1  A: 

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');
}
Darin Dimitrov
Yeah, I just noticed the extra dot (I dont know what the hell I was thinking!). Thanks for the simplified code too. The more I learn about jQuery, the more I love it !
morpheous