image description ->post_content
-
ok so im working on a site…
http://davidmolnarphotography.com/blog/i want do display the image description in the rollover at the top of the page.
i have accomplished this using this
<?php echo $all_photo_arr[0]->post_content; ?>
which shows the 1st image desc
or<?php echo $photo->post_content; ?>
which shows the last img desc.but i want it to change when the images change.
so i added this to the js that switches the images.
//switch image function SwitchImage(img){ $jpreloader.fadeIn("fast"); //show preloader var theNewImg = new Image(); theNewImg.onload = CreateDelegate(theNewImg, theNewImg_onload); theNewImg.src = img; document.getElementById("info").innerHTML= theNewImg.src ; }
this shows the new image src. i have tried replacing it with the above php echo, but it only loads the 1st or last desc.
it seems i need to replace the .src with somthing. any ideas?
- The topic ‘image description ->post_content’ is closed to new replies.