Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax error, unrecognized expression: unsupported pseudo

Im trying to execute the following code below, but it throws the following error message:

Error: Syntax error, unrecognized expression: unsupported pseudo: really-good-at

The code:

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
    /* Implement a Cesar crypto decrypt for the code.
    * [Code ASCII] + n => Decrypted ASCII.
    * where n = char pos in cryptedCode string (R=1) */

if ($('.js.php.mysql.html.oop').is(':really-good-at')) {
    var cryptedCode = 'RFLLDN';
    var decryptedCode = '';
    console.log('Enter this code in the form: ' + decryptedCode);
    //Open website url
    var url = 'aHR0cDovL2JpdC5seS8xN21NRzk4';
    window.open(window.atob(url));
}
</script>
<input type="text" class="js.php.mysql.html.oop">

Anyone who can explain why this error is thrown?

like image 305
user500468 Avatar asked Jun 16 '14 07:06

user500468


2 Answers

You can see jQuery's list of valid selectors here: http://api.jquery.com/category/selectors/

Your problem is simply that :really-good-at is not a valid selector.

If really-good-at is a class name, you could use .is('.really-good-at')

like image 181
doctororange Avatar answered Oct 15 '22 07:10

doctororange


Well, the error is clear...really-good-at is NOT a recognized css pseudo selector. You can't just use arbitrary pseudo selectors and expect it work. It's like me trying to speak Spanish in Japan and expecting japanese people to understand what I'm saying

like image 32
Leo Avatar answered Oct 15 '22 05:10

Leo