2011-11-15 30 views
0

我正在嘗試整合imgareaselect(http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop-v11/)和facebox(http:// defunkt。 io/facebox /)但是我沒有運氣,希望有人能幫忙。jquery imgareaselect和facebox

imgareaselect調用圖像上傳後

header("location:"); 

命令,但是這實際上重新加載整個頁面不只是facebox組件。我很堅持這一點,因爲我從未使用過imgareaselect插件。

任何幫助表示讚賞。

回答

0

,你可以嘗試更換header("location:");

echo '<script type="text/javascript">jQuery.facebox({ image: \'newCroppedImage.jpg\' });</script>'; 
下面

http://defunkt.io/facebox/

**Arbitrary Text** 
    jQuery.facebox('something cool'); 
    jQuery.facebox('something cool', 'my-groovy-style'); 
    **Remote files** 
    jQuery.facebox({ ajax: 'remote.html' }); 
    jQuery.facebox({ ajax: 'remote.html' }, 'my-groovy-style'); 
    **Image** 
    jQuery.facebox({ image: 'images/stairs.jpg' }); 
    jQuery.facebox({ image: 'images/stairs.jpg' }, 'my-groovy-style'); 
    **A Page Element** 
    jQuery.facebox({ div: '#box' }); 
    jQuery.facebox({ div: '#box' }, 'my-groovy-style'); 
如一些不同facebox方法