Is it a correct syntax


Is it a correct JQuery syntax ? This seems does not work.

 $("input,td,a,select,span,textarea,th").css("fontSize", 14px)

I wish to set the font size of all elements to 14px using jquery.
cofactorAsked:
Who is Participating?
 
Gurvinder Pal SinghConnect With a Mentor Commented:
syntax wise this is in-correct, it should be font-size

why don't you use

$("*").css("font-size", 14px)
0
 
cofactorAuthor Commented:
Excellent
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.