简体   繁体   English

无法使list.js正常工作

[英]Having trouble getting list.js to work

So I am new to using JS and I have looked over the list.js site and can't seem to figure this out. 因此,我是使用JS的新手,并且已经查看了list.js网站,但似乎无法弄清楚。 I can't even get the demo to run on my server. 我什至无法让演示在服务器上运行。 I can get my code to work on web based places like Encode and what not, but not my server. 我可以让我的代码在基于Web的地方(例如Encode)上工作,而不能在服务器上工作。

http://brewingbard.biz/smm/test/main-list2.html http://brewingbard.biz/smm/test/main-list2.html

Can someone please tell me why this is failing? 有人可以告诉我为什么这失败了吗? I copy stuff that works in one place and put it up here and then it stops. 我将一处有用的内容复制到此处,然后停下来。

<script src="list.js" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

Each <script> tag can only have one src . 每个<script>标记只能有一个 src

You need to load each script in its own element. 您需要将每个脚本加载到其自己的元素中。

Your code is running before the <div id="users"> exists. 您的代码在<div id="users">存在之前<div id="users">运行。
Therefore, it has nothing to operate on. 因此,它没有任何操作。

Move the invoking script block below the element. 将调用脚本块移动到元素下方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM