Your initial code should work, I realized that it wasn't working at the beggining because it wasn't in the DOM. So this, should work:
$('<img'>) .load(function(){ var width = $(this).width(), height= $(this).height(); alert(width + ' '+ height); }) .attr('src','../images/tabla-agrupada/level1header- collapse_open.gif') .appendTo('body'); On Oct 3, 6:37 pm, Wizzud <[EMAIL PROTECTED]> wrote: > Just do it the old-fashioned way... > > var objImage = new Image(); > objImage.onload = function(){ > var imgDim = { width : objImage.width, height : objImage.height }; > // ...... carry on processing... > }; > objImage.src = 'myPicture.jpg'; > > > > > > BAlex wrote: > > > Is JavaScript: > > > var img = new Image(); > > img.src = "1.jpg"; > > var width = img.width; > > var height = img.height; > > > It is necessary for preliminary loading image and, the main thing, for > > preliminary definition width and height. > > > How same to represent on jQuery? > > > In advance thanks, > > Alexander > > -- > View this message in > context:http://www.nabble.com/Question-to-experts-on-jQuery.-tf4554472s27240.... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.- > Hide quoted text - > > - Show quoted text -