无法在点击时刷新标签

时间:2014-07-30 16:17:35

标签: javascript jquery

我正在尝试点击按钮刷新标签。但是我收到错误"未定义不是函数"。

以下是html代码

 <div class="tabbable" id ="tabs">  
  <ul class="nav nav-tabs">  
  <li class="active"><a href="#overview" >Overview</a></li>
  <li class=""><a href="#edit" >Edit Company</a></li>  
  <li class=""><a href="#site" class ="site">Add/Manage Sites</a></li>    
  <li class=""><a href="#user" >Manage Users</a></li> 
 </ul>
</div>

<div class="tab-pane" id="site">  
    <div class="container center">
        <h3 class="center">Sites Management</h3>
        <table class="table table-striped table-hover" id="table-manage-user">
            <thead>
            <tr>
                <td><label>Site Name</label></td
                <td><label>Action</label></td>
            </tr>
            </thead>

         <tr>
<td><input type="text" class="form-control name"   id="site_name{ID}" value="{NAME}">    </td>

<td><div class="btn-group form-actions">
    <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
        Action <span class="caret"></span>
    </button>
    <ul class="dropdown-menu" role="menu">
      <li><a href="#" class='deleteSite' id='{ID}'>Delete</a></li>
    </ul>
 </div></td>
</tr>

        </table>
    </div>        
</div>

使用Javascript:

$('.deleteSite').on( 'click', function( event ) {
   $('#tabs').tabs('load', 2);

});

谁能告诉我这里有什么问题?

提前致谢

0 个答案:

没有答案