Why are there times when you use a ‘,’ vs ‘:’ to separate .CSS parameters?
for example:
$('#example').css("",""); vs. $('#example').css("":"");
I have use in this way.
$('#example').css("color","#000000");
$('#example').css("cursor":"pointer");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The colon is only used when you have to specify multiple values. But then you have to put the values in brackets and curly brackets and separate them by a comma.
For example:
Otherwise, when you only need to set one value, you use the comma: