1

wordpress プラグインで tablesorter を使用したいと考えています。

うちのテーブルはこんな感じ

    <table class="table table-condensed table-striped" style="font-size:80%;" id="table_id">
       <thead align="left">
         <tr>
        <th>col1</th>
        <th>col2</th>
            <th style="min-width:6em;">col3</th>
            <th style="min-width:4em";>col4</th>
         </tr>
      </thead>
   <tbody> 
   </tbody> 
</table>

テーブル行は後で動的に追加されます。

私が使用したPHPファイルで

  wp_enqueue_script('tablesorter', plugin_dir_url( __FILE__ ) . 'js/jquery.tablesorter.js', array('jquery172'));

私が使用したjavascriptファイルで

  $("#table_id").tablesorter(); 

ファイル jquery.tablesorter.js を js ディレクトリにコピーしました。しかし、何も起こりません。何がうまくいかないのですか?

4

1 に答える 1