在执行Jquery .load()之后,Dropzone不起作用 [英] The Dropzone is not working after Jquery .load() execute

查看:266
本文介绍了在执行Jquery .load()之后,Dropzone不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这是我的代码:



<$> p $ p $ $(document).ready(function(){
$('#sample')。load('sample.html')
});

脚本执行完成,sample.html现在被加载到我的...

 < form action =upload.phpclass =dropzone>< / form> 

位于dropzone js不可用。



请帮我解决这个问题。我想不出如何为此做出解决方案。



谢谢!

解决方案

您需要告诉dropzone重新分析文档。如果您使用jquery.load方法
也可以在上传器完全加载后使用Dropzone.discover方法。

$ $ p $ $ $ $ ')。load('sample.html',function(){
Dropzone.discover();
});


Hi can you help me to make a solution about my problem?

This is my code:

$(document).ready(function() {      
        $('#sample').load('sample.html')
});

after the script execute and the sample.html is now loaded where my...

<form action="upload.php" class="dropzone"></form>

is located the dropzone js is not working.

Please help me about this issue . I can't figured how to make a solution for this.

Thanks!

解决方案

You need to tell dropzone to reparse the document. If you using jquery.load method Also only use Dropzone.discover method after uploader is fully loaded.

$('#sample').load('sample.html', function() {
  Dropzone.discover();
});

这篇关于在执行Jquery .load()之后,Dropzone不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆