+ 2
What is the value of outerHeight() for the paragraph after the following code? $("p").height(84); $("p").css("margin", 8); $("p"
What is the value of outerHeight() for the paragraph after the following code? $("p").height(84); $("p").css("margin", 8); $("p").css("padding", 2); The answer is 88 but how??
2 Réponses
+ 1
outerHeight does not include the margin by default. You need to pass the boolean value true in order for it to include the margin.
As of now, you have 2 + 84 + 2 which is indeed 88. Call outerHeight(true) and you'll get 104.
+ 1
88