I tried with something like this:
var Height = $(this).naturalHeight;
But it doesn\'t work. Is there any way to do that
greez
$this.css('height', 'auto');
var height = $this.height();
I use the native javascript properties after applying jQuery and then stripping jQuery
.naturalWidth / .naturalHeight
On a jQuery object i use
var width = this.naturalWidth;
var height = this.naturalHeight;
or
var width = $("selector").get(0).naturalWidth;
var height = $("selector").get(0).naturalHeight;
if no jQuery object is selected.
With get(0) on a jQuery object you can access the associated DOM-element. On the native DOM element you can work with native javascript code (here access the nativ javascript attribute .naturalWidth)