「ゲーム」の版間の差分

提供:ヘイグ - 総合ゲームメディア
移動先:案内検索
編集の要約なし
編集の要約なし
1行目: 1行目:
{{テンプレート:パンくずリスト}}
{{テンプレート:パンくずリスト}}
<html>
<html>
<input type="text" id="searchInput" placeholder="テーブル内検索...">
<input type="search" class="light-table-filter" data-table="order-table" placeholder="検索" />
<script type="text/javascript">
$(document).ready(function() {
  $("#searchInput").on("keyup", function() {
    var value = $(this).val().toLowerCase();
    $("#yourTableID tr").filter(function() {
      $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
    });
  });
});
</script>
</html>
</html>


20行目: 10行目:
}}
}}


{| id="yourTableID" class="wikitable" style="margin: 0 auto"
{| class="wikitable order-table" style="margin: 0 auto"
! colspan="2" | ゲーム一覧
! colspan="2" | ゲーム一覧
{{#for_external_table:|
{{#for_external_table:|
33行目: 23行目:


[[Category:エンタメジャンル]]
[[Category:エンタメジャンル]]
<html>
<script type="text/javascript">
window.addEventListener('load', function() {
  'use strict';
  var LightTableFilter = (function(Arr) {
    var _input;
    function _onInputEvent(e) {
      _input = e.target;
      var tables = document.getElementsByClassName(_input.getAttribute('data-table'));
      Arr.forEach.call(tables, function(table) {
        Arr.forEach.call(table.tBodies, function(tbody) {
          Arr.forEach.call(tbody.rows, _filter);
        });
      });
    }
    function _filter(row) {
      var text = row.textContent.toLowerCase(), val = _input.value.toLowerCase();
      row.style.display = text.indexOf(val) === -1 ? 'none' : 'table-row';
    }
    return {
      init: function() {
        var inputs = document.getElementsByClassName('light-table-filter');
        Arr.forEach.call(inputs, function(input) {
          input.oninput = _onInputEvent;
        });
      }
    };
  })(Array.prototype);
  LightTableFilter.init();
});
</script>
</html>
https://emagg.jp/ゲーム」から取得