jQuery Migrate Plugin showing Errors

As per my knowledge, jQuery migrate restores the APIs that were removed, and shows warnings in the browser console when removed and/or deprecated APIs are used. “That way you can spot and fix what otherwise would have been errors.” – this is what they say.

I’m using jQuery migrate 1.4.1 with jQuery 2.2.4 and I’m expecting that my existing code will not break. But my code does break in many places.

[var].replace is not a function

Uncaught Error: Syntax error, unrecognized expression: #itemtarget

[var] is not a string, hence the error. I understand.
I also understand that changing

$('#itemtarget input[attrValue]!=""').each(function () { //code here });


$("#itemtarget").find("input[attrValue != '']").each(function () { //code here });

fixes the second error.

But I do not want to be altering my code right now, I was hoping I’ll use Migrate Plugin and leave my code as is for the time-being.

Why is migrate plugin causing/not handling these errors?

37 thoughts on “jQuery Migrate Plugin showing Errors”

  1. 822118 462487Hey there. I want to to ask a bit somethingis this a wordpress internet log as we are planning to be transferring more than to WP. Additionally did you make this template all by yourself? Several thanks. 739450