posted on Feb 24, 2010 at 8:25 p.m. EST in
$(document).ready(function(){
var thumb = $('img#thumb');
new AjaxUpload('imageUpload', {
action: $('form#newHotnessForm').attr('action'),
name: 'image',
onSubmit: function(file, extension) {
$('div.preview').addClass('loading');
},
onComplete: function(file, response) {
thumb.load(function(){
$('div.preview').removeClass('loading');
thumb.unbind();
});
thumb.attr('src', response);
}
});
});
js
1
$ ( document ). ready ( function (){
var thumb = $ ( 'img#thumb' );
new AjaxUpload ( 'imageUpload' , {
action : $ ( 'form#newHotnessForm' ). attr ( 'action' ),
name : 'image' ,
onSubmit : function ( file , extension ) {
$ ( 'div.preview' ). addClass ( 'loading' );
},
onComplete : function ( file , response ) {
thumb . load ( function (){
$ ( 'div.preview' ). removeClass ( 'loading' );
thumb . unbind ();
});
thumb . attr ( 'src' , response );
}
});
});
copy
|
embed
Hey there! I see you're running Internet Explorer 6.
That's neat. This reminds me of my grandpa. He had this old car that he kept having to fix. He spent so much money on it that he didn't want to get rid of it (even when it stopped running).
You guys should hang out.
Here's a free sports car from Snipt.
1 Comment
It simplifies the screen to the user and allows unlimited number of thumbnails without needing an id for each.