我想用一个插件来让我的大部分车型直列可编辑的,但我不明白以下内容:

  

要使用它,包括   在jquery.rest_in_place.js您   模板,并在执行下面的   文档的onLoad处理:

     

的jQuery( “rest_in_place。”)rest_in_place();

http://jan.varwig.org/projects/rest-in-place

我在哪里可以把这个?

有帮助吗?

解决方案

它们可能意味着jQuery的文档准备事件。

在您的<head>部分,放置一个$(document).ready();这样。

<head>
    <script type="text/javascript">
        jQuery(document).ready(function() {
            jQuery(".rest_in_place").rest_in_place();
        });
    </script>
</head>

<head>
      <script type="text/javascript">
          jQuery(function() {
               jQuery(".rest_in_place").rest_in_place();
          });
      </script>
</head>

其他提示

作者可能意指被执行了jQuery 准备处理程序时的所述DOM(分层结构文件)被完全加载。

您JavaScript代码应如下所示

$(document).ready(function() {
    $(".rest_in_place").rest_in_place();
});

请注意$jQuery的同义词(除非明确启用兼容模式)。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top