我试图整合imgareaselect (http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop-v11/)和facebox (http://defunkt.io/facebox/),但我没有运气,希望有人能帮助。
imgareaselect调用
header("location:");
命令,但这实际上重新加载整个页面,而不仅仅是facebox组件。我很坚持这个,因为我从来没有使用过imgareaselect插件。
你可以尝试用:
代替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');