On 28 Apr., 23:12, Mike Alsup [EMAIL PROTECTED] wrote:
var $img = $('img src='+files[pos]+' id=file'+pos+'class=picture')
.appendTo('#pictures')
.bind('load', function() { alert('loaded') });
Thanks, this works. Why do you use appendTo instead of html? I
must say I don't understand
On 28 Apr., 23:18, Erik Beeson [EMAIL PROTECTED] wrote:
Maybe $('#pictures').html(...).children().bind(...)
Amazingly this works, see http://www.orpatec.ch/gallery4.html
But I think you're trying to hard to use jQuery. How about this
(tested on FF2/Mac):
Possibly but I want to learn jQuery.
Try this:
$('#pictures').html(...).bind(load,function(){...});
~Sean
On 28 Apr., 15:39, Sean Catchpole [EMAIL PROTECTED] wrote:
Try this:
$('#pictures').html(...).bind(load,function(){...});
I've tried
$('#pictures').html('img src=...').bind ('load', sizeImage);
function sizeImage() {
alert ('sizeImage');
}
The alert is never shown, see
Wyo,
Try something like this:
var $img = $('img src='+files[pos]+' id=file'+pos+'class=picture')
.appendTo('#pictures')
.bind('load', function() { alert('loaded') });
But be aware that if the image is already in the browser cache the
load event will not fire in IE. You can use the
Maybe $('#pictures').html(...).children().bind(...)
But I think you're trying to hard to use jQuery. How about this
(tested on FF2/Mac):
var img = new Image();
img.onload = function() { img_width = this.width; img_height = this.height; };
img.src = '...';
$('#pictures').html(img);
Or if you
6 matches
Mail list logo