0

我正在尝试整合 imgareaselect (http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop-v11/) 和 facebox (http://defunkt.io/facebox/) 但是我我一点运气都没有,希望有人能提供帮助。

imgareaselect 调用

 header("location:");

上传图片后的命令,但这实际上会重新加载整个页面,而不仅仅是 facebox 组件。我非常坚持这一点,因为我以前从未使用过 imgareaselect 插件。

任何帮助表示赞赏。

4

1 回答 1

0

您可以尝试替换header("location:");为:

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

下面是一些不同的 facebox 方法,如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');
于 2011-11-15T10:21:40.670 回答