Hi I am using following code for applying multiple attributes of css through jquery. My code is
$("div:contains('Awais')").css( {text-decoration : 'underline', cursor : 'pointer'} );
I get javascript error
missing : after property id
$("div:contains(John)").css( {text-dec...: 'underline', cursor : 'pointer'} );
But When I remoce text-decoration property the error vanishes. What is wrong with this code
text-decorationis an invalid property name unless it’s enclosed in quotes as a string:Object properties must be enclosed in quotes unless they are valid Javascript identifiers. This is true for declarations in object literals and also for accessing using the dot notation (so
object.text-decorationis invalid.