admin管理员组文章数量:1287792
How to use FancyUpload in a JQuery based project? The page in which I will use FancyUpload is made of JQuery. How to use FancyUpload? Please mention every steps in details. Please
How to use FancyUpload in a JQuery based project? The page in which I will use FancyUpload is made of JQuery. How to use FancyUpload? Please mention every steps in details. Please
Share Improve this question asked Apr 26, 2010 at 9:09 Mazhar AhmedMazhar Ahmed 1,5433 gold badges24 silver badges41 bronze badges 1- mootools is required for FancyUpload or you can try to write it with jquery! – Krunal Commented Apr 26, 2010 at 9:20
4 Answers
Reset to default 7You could just place jQuery in noConflict mode. Doing this requires that you put wrappers around all jQuery code where mootools will be loaded on the page. It's simple enough.
Example:
<script language="javascript" type="text/javascript" src="https://ajax.googleapis./ajax/libs/mootools/1.2.5/mootools-yui-pressed.js"></script>
<script type="text/javascript" src="http://ajax.googleapis./ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
jQuery.noConflict();
</script>
<script type="text/javascript" language="javascript">
// Example with Sep Mootools and jQuery domready's...
(function($){
window.addEvent('domready',function() {
// Do some MooTools Magic here!
});
})(document.id);
(function($) {
$(document).ready(function() {
// Do some jQuery stuff!
});
})(jQuery);
// Example with Mootools used as domready, with jQuery calls inside
(function($){
window.addEvent('domready',function() {
// Some mootools magic here!
//......
//Option 1 for jQuery using jQuery identifier...
alert(jQuery("#some_input_value").val());
// Option 2 for jQuery using temp override of $
(function($) {
alert($("#some_input_value").val());
})(jQuery);
});
})(document.id);
</script>
maybe you should use http://www.uploadify./demo/, its native Jquery with Flash. FancyUpload is a mootools plugin.
I successfully implemented FancyUpload with jQuery loaded as I discussed above. jQuery.noConflict() is the best solution if you want both jQuery and Mootools to co-exist. Otherwise, yeah, probably should stick with either "just" jQuery or "just" mootools.
My opinion, though, is that (while I'm a jQuery fan), the FancyUpload tool for Mootools is hands-down the cleanest, nicest looking, best/easiest to use tool for the job. it's the only piece that was mootools for me, and is light-weight enough to include without seriously burdening the browser loadtime.
If your heart is set on using FancyUpload in your jQuery project:
Step #1: Get MooTools.
FancyUpload does not work in jQuery, and as far as I know, there are no plans to make it do so. There are, of course, plenty of alternatives, such as meo's answer, above.
本文标签: javascriptFancyUpload with JQueryStack Overflow
版权声明:本文标题:javascript - FancyUpload with JQuery - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741289834a2370484.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论