我对 Javascript 不是很好,我目前正在尝试将手风琴功能添加到 div,以便我可以揭示更多细节。这是我目前的移动网站,http ://txf4199.cias.rit.edu/mobile-test-4/index.html#work
问题:我可以点击“查看更多”,手风琴效果会很好地显示内容。但是,如果我使用站点顶部的过滤器(“Mobile”、“Motion”等),手风琴效果将不再起作用。
仅供参考:过滤器使用 quicksand.js(过滤插件)和 main.js(自定义脚本),但手风琴效果只是使用内联脚本,因为它太小了。
这是我的 js 文件的列表:
<!-- jQuery -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.quicksand.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
$('.accordionButton').click(function() {
$(this).next().slideToggle();
});
});
</script>
我已经查找了文档就绪功能,认为问题不止一个,但这是可以接受的,所以我不知道该去哪里找。任何帮助将不胜感激,我会像鹰一样看这篇文章,提前谢谢你!