Jason94 Jason94 - 1 month ago 5
jQuery Question

How do i get the height of the input?

I'm using jquery to add a plugin to a input field. How to I get the height?

$("#age").myownplugin();

<input type="text" id="age" />


and inside myownplugin i've tried

alert( $(this).height )


without the result.

Answer

height is a method: $(this).height();