views:

44

answers:

1

How can I get and set a <td>'s height and a <p>'s CSS property font-size with JavaScript?

+1  A: 
var h = $('td').height();
$('p').css('font-size', '12pt');

www.jquery.com

just somebody
Why would this work (i.e. answer Pieters question)? Does [$('td')] make any sense? Doesn't the .css method only SET the font size? Did Pieter ask for a jquery answer? Not so great an answer, I would say, sorry.
KooiInc
jQuery is a *javascript* library. he didn't say he wanted them both set and retrieved in one go, mr. smarty.
just somebody
well, the question starts with: "How can I get and set..."
KooiInc