Jquery,meteorjs,editabletext package

时间:2016-01-15 14:44:08

标签: javascript jquery meteor

我的问题是当我点击编辑按钮时,jquery make会使editabletext字段成为焦点。这是我的代码

$('.edit').click(function() {
    $('#editingTask').focus();
});

<ul>
    {{#each tasksToDo}}
        {{>task}}
    {{/each}}
</ul>


<template name="task">
  <li class="list_item">
    <span id="editingTask">{{> editableText collection="tasks" field="title"}}</span>
    <br>
    <div class="editBt">
        <button class="completed">Completed</button>
        <button class="edit">Edit</button>
        <button class="delete">Delete</button>
    </div>
  </li>
</tempate>

0 个答案:

没有答案