PDA

View Full Version : PHP Photo Album.. Is this simple/feasible?



sany
10-03-2008, 05:07 PM
1) Script Title: PHP Photo Album script

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm

3) Describe problem:

This may be unrealistic but as I know nothing about JS I have to ask...

Is it possible to easily incorporate the following code into the PHP Photo Album script using jquery.js?

<script type="text/javascript">


<!--
$(function () {
var img = new Image();
$(img).load(function () {
//$(this).css('display', 'none'); // .hide() doesn't work in Safari when the element isn't on the DOM already
$(this).hide();
$('#targetdiv').removeClass('loading').append(this);
$(this).fadeIn();
}).error(function () {
// notify the user that the image could not be loaded
}).attr('src', imgsrc.href );

});

//-->
</script>

Any help would be greatly appreciated.

Thanks

Ps: I should add that there may be a simpler way to do this and the aim is to fade in the images once fully loaded, Large Images and the Thumbs.