简体   繁体   English

使用jQuery内联编辑

[英]inline edit with jQuery

I am using inline editing using jQuery. 我正在使用jQuery进行内联编辑。 I can edit the table data easily when the data is not big (less than 100 rows) But when it is more than 100 rows the page will be slower in loading and the edit function will be very slow(slow to open the edit box). 当数据不大(少于100行)时,我可以轻松地编辑表数据,但是当数据超过100行时,页面的加载速度将变慢,编辑功能将非常缓慢(打开编辑框的速度将变慢) 。

I found that the problem is from this import: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> 我发现问题来自此导入: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>

If I remove this line the page will be loaded fast as normal. 如果我删除此行,页面将照常快速加载。 Any suggestions please. 有任何建议请。

Thanks, 谢谢,

You just need to manage pagination for listing of the records rather than listing all records. 您只需要管理分页以列出记录,而不是列出所有记录。 And always include js in the footter 并且始终在页脚中包含js

Use a local copy of the jquery and a higher version preferably over 1.7. 使用jquery的本地副本和更高版本(最好是1.7以上)。 Put all your js code at the bottom of the page. 将所有js代码放在页面底部。

<body>
<!--  document body here -->
<script src="js/jquery1.8.3.min.js"></script>
<!--  some jquery plugins here -->
<script>
 // your code here.
</script>
</body>

And you can use a jquery plugin to edit things in place. 您可以使用jquery插件在适当位置进行编辑。 If you are facing issues with your custom code. 如果您的自定义代码遇到问题。

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

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