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?
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')
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With