def is_jquery_not_defined_error(msg):
    """
    Check whether the JavaScript error message is due to jQuery not
    being available.
    """

    # Firefox: '$ is not defined'
    # Chrome: 'unknown error: $ is not defined'
    # PhantomJS: JSON with 'Can't find variable: $'
    return any(txt in msg for txt in (
        "$ is not defined",
        "Can't find variable: $",
    ))