tags:

views:

12

answers:

0

Hello!

I'm using pirobox as an image preview for an image selector tool i'm building. at the moment, you can preview the image (pirobox) and also select a new image to replace the existing one.

When you click to select a new image, a list comes up with all the different images available (from database, so using $.post() to retrieve). Once you select the new image, it updates a database (again with a $.post() action) and re-retrieves the updating the thumbnail that previews the image (pirobox).

I think what's happening is that since I'm updating the image info, it's unbinding (is that the correct term?) the pirobox action from the image and therefore not calling up the pirobox script correctly.

My jquery / javascript knowledge is a bit patchy to say the least, so I have no idea how to solve this one! any help would be appreciated!!

Thanks in advance!

-- edit to include code as requested --

original image call:

<div class="full-width">
    <a href="../media_file_destination/file1-medium.jpg" class="pirobox" title="Concept Car"><img src="../media_file_destination/th_file1-medium.jpg"  class="thumb" /></a> 
    <button type="button" class="img_list float-right" iid="panel_image" pid="1" >Change</button>
</div>

script initiating pirobox:

$().piroBox({
        my_speed: 400, //animation speed
        bg_alpha: 0.3, //background opacity
        slideShow : true, // true == slideshow on, false == slideshow off
        slideSpeed : 4, //slideshow duration in seconds(3 to 6 Recommended)
        close_all : '.piro_close,.piro_overlay'// add class .piro_overlay(with comma)if you want overlay click close piroBox

});

I've not modified the pirobox code at all.