###前提・実現したいこと
cakePHPでサイトを作っています。
jQueryのfloatTheadを使用してテーブルのヘッダをスクロールしても見えるようにしたいです。
サイト自身のヘッダ(サイトタイトル)とパン屑リストがあり、スクロールしても常にサイト上部で出るようにしてありますがfloatTheadがサイト自身のヘッダとパン屑の裏側に表示されてしまい、テーブルのヘッダが見えません。
スクロールするとパン屑リストの下にテーブルのヘッダがでるようにするにはどうすればよろしいでしょうか。
###該当のソースコード
画面表示用
<!-- ヘッダーナビゲーション --> <?php echo $this->element('header_nava', array('actionNm', $actionNm)); ?> <!-- パンくずリスト --> <?php echo $this->element('breadcrumb', array('breadcrumbs', $breadcrumbs)); ?> ・ ・ ・ <div class="table-responsive" id="list_area"> <?php echo $this->requestAction('下のリストデータを呼んでる');?> </div> ・ ・ ・ <script type="text/javascript"> $(function(){ "use strict"; $(window).on("load", function(e){ $('table.table-fix').floatThead({}); }); }); </script>
リストデータ
<table class="table table-striped table-condensed table-bordered sheet table-fix" id="customer_table"> <thead> <tr> <th id="cell_1" style="width: 40px">No.</th> <th id="cell_2" style="width: 93px">操作</th> <th id="cell_3">顧客名</th> </tr> </thead> <tbody> <tr> <td> 1 </td> <td> 詳細 </td> <td> 顧客名 </td> </tr> </table>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。