I am trying to implement a “checkall” with the following code:

<script>
    jQuery('.grpInclude').on('click', function(e){
        e.preventDefault();
        var checkBoxes = jQuery('input[id=*"grpInc"]');
        checkBoxes.prop("checked", !checkBoxes.prop("checked"));
    });
</script>

However, it keeps failing with: Error: Syntax error, unrecognized expression: input[id=*"grpInc"]

I’ve also tried it as input[id=^"grpInc"] and it fails with the same issue.

What can I do to fix

Read more here: WordPress 3.9 and jQuery Wildcard Selector Issue


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: