jQuery的slidedown()函数已弃用? [英] jQuery's slidedown() function deprecated?
本文介绍了jQuery的slidedown()函数已弃用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用$('#theDiv').slideDown('fast');
在我使用的jQuery版本3.2.1中,出现控制台错误
In the jQuery version I'm using, 3.2.1, I get a console error
TypeError: $(...).slideDown is not a function
我是否正确,该功能已被弃用,如果是,为什么,并且有可用的替代品吗?
Am I right that the function has been deprecated, and if so, why, and is there a replacement available?
当我使用时可以使用
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
但不是
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
推荐答案
不推荐使用,应该可以使用.
Not deprecated and should work.
您正在使用超薄版本,该版本不包含效果和ajax函数.
You are using the slim version, which does not include the effects and ajax functions.
请改用此代码: https://code.jquery.com/jquery-3.3.1.min.js
这篇关于jQuery的slidedown()函数已弃用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文