javascript - Error appearing in jQuery .hover() implementation, but looks exactly like documentation example -
i'm trying implement jquery's hover function have done before , how thought done , i'm looking @ jquery api documentation , looks i'm doing correctly, getting error:
uncaught syntaxerror: unexpected token } on line 4
here code:
$('#dismissallbutton').hover( function(){ $(this).css({'color':'#000000', 'rgb(0, 0, 0)'}); }, function(){ $(this).css({'color':'#ffffff', 'rgb(255, 255, 255)'}); } );
you're missing keys in objects inside css()
, , that's syntax error
$('#dismissallbutton').hover( function(){ $(this).css({'color':'#000000', bordercolor: 'rgb(0, 0, 0)'}); }, function(){ $(this).css({'color':'#ffffff', bordercolor: 'rgb(255, 255, 255)'}); } );
i used bordercolor
example
if rgb colors sort of fallback, remove them, not needed
Comments
Post a Comment