{"id":303,"date":"2011-08-15T01:53:51","date_gmt":"2011-08-14T16:53:51","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2011\/08\/15\/jquery_ie\/"},"modified":"2011-08-15T01:53:51","modified_gmt":"2011-08-14T16:53:51","slug":"jquery_ie","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2011\/08\/15\/jquery_ie\/","title":{"rendered":"jQuery \u30c6\u30fc\u30d6\u30eb\u30d7\u30e9\u30b0\u30a4\u30f3\u304cIE\u3067\u306f\u9045\u3059\u304e\u308b\u306e\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3057\u3066\u307f\u308b"},"content":{"rendered":"<p>jQuery \u306e\u30c6\u30fc\u30d6\u30eb\u7528\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u753b\u9762\u306e\u63cf\u753b\u3001\u304a\u3088\u3073\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u305f\u3068\u304d\u306e\u53cd\u5fdc\u304c\u4f7f\u7528\u306b\u8010\u3048\u306a\u3044\u304f\u3089\u3044\u9045\u3059\u304e\u308b\u3002<\/p>\n<p>\u307e\u3041\u3001\u4eca\u56de\u884c\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u5217\u304c\u6570\u5341\u3042\u308b\u3088\u3046\u306a\u30c6\u30fc\u30d6\u30eb\u306e\u3053\u3068\u3067\u3001\u5404\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30c7\u30e2\u3067\u6271\u308f\u308c\u3066\u3044\u308b\u4ef6\u6570\u306a\u3089\u3001\u554f\u984c\u306a\u3044\u3002<\/p>\n<p>\u305d\u3082\u305d\u3082\u305d\u3093\u306a\u306b\u5217\u304c\u3042\u308b\u3088\u3046\u306a\u753b\u9762\u8a2d\u8a08\u306b\u3059\u308b\u306a\u3068\u304b\u8a00\u3046\u8a71\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3001\u696d\u52d9\u30a2\u30d7\u30ea\u3060\u3068\u7d50\u69cb\u305d\u306e\u304f\u3089\u3044\u5217\u3092\u3082\u3063\u305f\u30c6\u30fc\u30d6\u30eb\u304c\u5fc5\u8981\u306a\u5834\u5408\u3082\u3042\u308a\u304c\u3061\u306a\u306e\u3067\u3001\u4eca\u56de\u3060\u3051\u8a2d\u8a08\u306e\u5909\u66f4\u3067\u56de\u907f\u3068\u3044\u3046\u306e\u3082\u9055\u3046\u6c17\u304c\u3059\u308b\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u5b9f\u306f\u3001Chrome \u3067\u306f\u305d\u3053\u305d\u3053\u306e\u901f\u5ea6\u3067\u52d5\u304d\u3001\u5b9f\u7528\u306b\u306f\u8010\u3048\u3089\u308c\u305d\u3046\u306a\u306e\u3060\u3002\u304c\u3001\u554f\u984c\u306fIE8\u3002\u30b7\u30b9\u30c6\u30e0\u8981\u4ef6\u4e0a\u3001IE8\u3067\u52d5\u4f5c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3093\u3060\u3088\u306a\u30fc<\/p>\n<p><a href=\"http:\/\/www.datatables.net\/\">DataTable<\/a> \u3084\u3001<a href=\"http:\/\/flexigrid.info\/\">Frexigrid<\/a>\u3001<a href=\"http:\/\/tablesorter.com\/docs\/\">tablesoter<\/a> \u306a\u3093\u304b\u3092\u3044\u308d\u3044\u308d\u8a2d\u5b9a\u3092\u5909\u3048\u306a\u304c\u3089\u3001\u8a66\u3057\u305f\u306e\u3060\u304c\u3001\u3069\u308c\u3082\u4eca\u3075\u305f\u3064\u307f\u3063\u3064\u3002<\/p>\n<p>\u307e\u3041\u3001\u305d\u3082\u305d\u3082\u305d\u3093\u306a\u9ad8\u6a5f\u80fd\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u5fc5\u8981\u306f\u7121\u3044\u3002\u3067\u304d\u308c\u3070\u3082\u3061\u308d\u3093\u3046\u308c\u3057\u3044\u306e\u3060\u304c\u3001\u6c4e\u7528\u6027\u3088\u308a\u5fdc\u7b54\u6027\u3092\u3068\u3089\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u5c40\u9762\u3002\u305b\u3063\u304b\u304f\u306a\u306e\u3067\u3001jQuery\u306e\u52c9\u5f37\u304c\u3066\u3089\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u81ea\u4f5c\u3057\u3066\u307f\u3088\u3046\u3002<\/p>\n<p>&#160;<\/p>\n<h2><\/h2>\n<h2>\u8981\u4ef6<\/h2>\n<p>\u968f\u6642\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u898b\u306a\u304c\u3089\u6a5f\u80fd\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3068\u3057\u3066\u3001\u6700\u4f4e\u9650\u306e\u8981\u4ef6\u306f\u3001<\/p>\n<ul>\n<li>\u6570\u5341\u5217 \u00d7 \u6570\u767e\u884c \u306e\u30c7\u30fc\u30bf\u304c(\u901a\u5e38\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u6bd4\u3079)\u5fc5\u8981\u4ee5\u4e0a\u306b\u9045\u304f\u306a\u3089\u305a\u306b\u63cf\u753b\u3055\u308c\u308b\u3053\u3068\u3002 <\/li>\n<li>\u30c6\u30fc\u30d6\u30eb\u30d8\u30c3\u30c0\u30fc\u3092\u56fa\u5b9a <\/li>\n<li>\u30dc\u30c7\u30a3\u30fc\u306e\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u306b\u3042\u308f\u305b\u3066\u30d8\u30c3\u30c0\u30fc\u3092\u30b9\u30af\u30ed\u30fc\u30eb <\/li>\n<\/ul>\n<p>\u3093\u30fc\u6700\u521d\u306f\u3053\u3093\u306a\u7a0b\u5ea6\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>jQuery \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210<\/h2>\n<p>jQuery\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210\u81ea\u4f53\u306f\u7c21\u5358\u3060\u3002<a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114683\/ref=as_li_ss_tl?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114683\">jQuery\u30af\u30c3\u30af\u30d6\u30c3\u30af<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=&amp;l=as2&amp;o=9&amp;a=4873114683\" width=\"1\" height=\"1\" \/> \u306b\u3001\u4e01\u5be7\u306b\u89e3\u8aac\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u3002\u4e71\u66b4\u306b\u624b\u9806\u3092\u66f8\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u611f\u3058\u304b\u3002<\/p>\n<ol>\n<li>\u30e9\u30b0\u30a4\u30f3\u3092\u533f\u540d\u95a2\u6570\u3067\u30e9\u30c3\u30d7\u3057\u3001\u3059\u3050\u305d\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001$ \u3067jQuery\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u7167\u3067\u304d\u308b (1) <\/li>\n<li>jQuery.fn \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30e1\u30bd\u30c3\u30c9\u540d\u3067\u62e1\u5f35\u3057jQuery\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u6210\u3059\u308b (2) <\/li>\n<li>jQuery \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u8907\u6570\u306e\u7d50\u679c\u306b\u5bfe\u5fdc\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001each() \u51e6\u7406\u3092\u884c\u3046 (3) <\/li>\n<\/ol>\n<pre class=\"prettyprint linenums\">;(function($){    \/\/ (1) \r\n  $.fn.lightable = function(options) { \/\/ (2)\r\n    var options = $.extend({\r\n      \/\/ \u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\r\n    },options);\r\n    \r\n    return this.each(function(){ \/\/ (3)\r\n      \/\/ \u51e6\u7406\u672c\u4f53\r\n      \r\n    });\r\n  };\r\n})(jQuery);<\/pre>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114683\/ref=as_li_ss_il?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114683\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws.assoc-amazon.jp\/widgets\/q?_encoding=UTF8&amp;Format=_SL110_&amp;ASIN=4873114683&amp;MarketPlace=JP&amp;ID=AsinImage&amp;WS=1&amp;tag=typea09-22&amp;ServiceVersion=20070822\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=&amp;l=as2&amp;o=9&amp;a=4873114683\" width=\"1\" height=\"1\" \/> <\/p>\n<p>&#160;<\/p>\n<h2>\u30c6\u30fc\u30d6\u30eb\u306e\u69cb\u6210<\/h2>\n<p>\u809d\u5fc3\u306e\u3001\u30c6\u30fc\u30d6\u30eb\u306b\u3064\u3044\u3066\u3060\u304c\u3001\u5c11\u3057\u3067\u3082IE\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u63cf\u753b\u53cd\u5fdc\u3092\u3088\u304f\u3059\u308b\u305f\u3081\u306b\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u63cf\u753b\u306b\u3001\u56fa\u5b9a\u30ec\u30a4\u30a2\u30a6\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u7528\u3044\u3089\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p>\u300c\u8868\u306f\u901a\u5e38\u3001\u69cb\u6210\u8981\u7d20\u3092\u3059\u3079\u3066\u8aad\u307f\u8fbc\u3093\u3067\u304b\u3089\u8868\u793a\u3055\u308c\u308b\u3002table-layout \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u8868\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u306b\u4f7f\u7528\u3059\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u9078\u629e\u3067\u304d\u308b\u3002\u300d<\/p>\n<p>\u3068\u3001\u300c<a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4798010928\/ref=as_li_ss_tl?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4798010928\">Web\u6a19\u6e96\u306e\u6559\u79d1\u66f8\u2015XHTML\u3068CSS\u3067\u3064\u304f\u308b\u201c\u6b63\u3057\u3044\u201dWeb\u30b5\u30a4\u30c8<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=&amp;l=as2&amp;o=9&amp;a=4798010928\" width=\"1\" height=\"1\" \/>\u300d\u306b\u3042\u308a\u3001\u56fa\u5b9a\u30ec\u30a4\u30a2\u30a6\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u63a1\u7528\u3055\u308c\u308b\u305f\u3081\u306b\u306f\u3001<\/p>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4798010928\/ref=as_li_ss_il?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4798010928\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws.assoc-amazon.jp\/widgets\/q?_encoding=UTF8&amp;Format=_SL110_&amp;ASIN=4798010928&amp;MarketPlace=JP&amp;ID=AsinImage&amp;WS=1&amp;tag=typea09-22&amp;ServiceVersion=20070822\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=&amp;l=as2&amp;o=9&amp;a=4798010928\" width=\"1\" height=\"1\" \/> <\/p>\n<p>&#160;<\/p>\n<ol>\n<li>table-layout:fixed \u306b\u8a2d\u5b9a\u3059\u308b <\/li>\n<li>width \u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u8868\u5168\u4f53\u306e\u5e45\u3092\u6307\u5b9a\u3059\u308b <\/li>\n<\/ol>\n<p>\u3068\u3001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002width \u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u672a\u6307\u5b9a\u3084\u300cauto\u300d\u306e\u5834\u5408\u306f\u3001\u81ea\u52d5\u30ec\u30a4\u30a2\u30a6\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u63a1\u7528\u3055\u308c\u3066\u3057\u307e\u3046\u3002<\/p>\n<h2>\u4f5c\u6210\u3057\u3066\u307f\u305f<\/h2>\n<p>\u3053\u3093\u306a\u611f\u3058\u3002\u307e\u3063\u305f\u304f\u6a5f\u80fd\u6027\u304c\u306a\u3044\u306e\u3067\u3001\u5bc2\u3057\u304f\u306f\u3042\u308b\u3002\u304c\u3001\u307e\u3041\u30b9\u30bf\u30fc\u30c8\u30e9\u30a4\u30f3\u306a\u306e\u3067\u3088\u3057\u3068\u3059\u308b\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/jQueryIE_AF4\/lightable01.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"lightable01\" border=\"0\" alt=\"lightable01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/jQueryIE_AF4\/lightable01_thumb.jpg\" width=\"279\" height=\"185\" \/><\/a> <\/p>\n<p>\u4ee5\u4e0b\u5185\u5bb9\u3002<\/p>\n<h3>jQuery\u30d7\u30e9\u30b0\u30a4\u30f3 (jquery.lightable.js)<\/h3>\n<p>jQuery \u306e\u6982\u8981\u3084\u30bb\u30ec\u30af\u30bf\u3001\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3068\u3057\u3066\u3001\u300c<a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4844329618\/ref=as_li_ss_tl?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4844329618\">jQuery\u9006\u5f15\u304d\u30de\u30cb\u30e5\u30a2\u30eb Web\u30c7\u30b6\u30a4\u30f3\u306e\u73fe\u5834\u3067\u5f79\u7acb\u3064\u57fa\u672c\u3068\u5b9f\u8df5<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=&amp;l=as2&amp;o=9&amp;a=4844329618\" width=\"1\" height=\"1\" \/> \u300d\u306f\u975e\u5e38\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u3066\u3001\u826f\u66f8\u3002\u53c2\u8003\u306b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u306a\u304c\u3089\u3001\u3001\u3001<\/p>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4844329618\/ref=as_li_ss_il?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4844329618\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws.assoc-amazon.jp\/widgets\/q?_encoding=UTF8&amp;Format=_SL110_&amp;ASIN=4844329618&amp;MarketPlace=JP&amp;ID=AsinImage&amp;WS=1&amp;tag=typea09-22&amp;ServiceVersion=20070822\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=&amp;l=as2&amp;o=9&amp;a=4844329618\" width=\"1\" height=\"1\" \/> <\/p>\n<p>\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u3001<\/p>\n<ul>\n<li>$.extend \u3067\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u4f7f\u7528 <\/li>\n<li>COL \u8981\u7d20\u306b \u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u6e21\u3055\u308c\u305f\u3001width \u3092\u30bb\u30c3\u30c8\u3002 \u3053\u3053\u3067 align \u3084\u3089\u30b9\u30bf\u30a4\u30eb\u3084\u3089\u5217\u3054\u3068\u306e\u5b9a\u7fa9\u3092\u6307\u5b9a\u3067\u304d\u308c\u3070\u3088\u3044\u306e\u3060\u304c\u3001\u3069\u3046\u3082\u3067\u304d\u306a\u3055\u305d\u3046\u3060\u3002IE6\u3067\u306f\u3067\u304d\u305f\u306e\u3060\u304c\u3001\u3067\u304d\u3066\u3057\u307e\u3046\u306e\u304c\u3069\u3046\u3084\u3089\u304a\u304b\u3057\u3044\u3088\u3046\u3060\u3002\u5217\u306e\u30b9\u30bf\u30a4\u30eb\u9069\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001\u6539\u3081\u3066\u691c\u8a0e\u3057\u3088\u3046\u3002 <\/li>\n<li>TABLE \u3092 DIV \u3067\u56f2\u3093\u3067\u3001\u30d8\u30c3\u30c0\u30fc\u3092\u30b3\u30d4\u30fc\u3057\u3066\u5225\u306eDIV\u3067\u56f2\u307f\u3001\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u3092\u540c\u671f\u3055\u305b\u308b <\/li>\n<\/ul>\n<p>\u304f\u3089\u3044\u304b\u3002 <\/p>\n<pre class=\"prettyprint linenums\">;(function($){\r\n  $.fn.lightable = function(options) {\r\n    var cfg = $.extend({\r\n      height:&quot;100%&quot;,\r\n    },options);\r\n    \r\n    var table, headerTable;\r\n    var wrapper, headWrapper, bodyWrapper;\r\n    \r\n    \/**\r\n     * \u51e6\u7406\u672c\u4f53\r\n     *\/\r\n    return this.each(function(){\r\n      table = $(this);\r\n      table.attr({cellspacing:&quot;0&quot;, border:&quot;0&quot;, cellpadding:&quot;0&quot; });\r\n      \r\n      headerTable = $(document.createElement(&quot;table&quot;));\r\n      headerTable.attr({cellspacing:&quot;0&quot;, border:&quot;0&quot;, cellpadding:&quot;0&quot; });\r\n      \r\n      headerTable.prepend($(&quot;thead&quot;, table).addClass(&quot;ui-widget-header&quot;).clone());\r\n      $('thead tr',headerTable).append(&quot;&lt;th&gt;&lt;\/th&gt;&quot;);  \/\/ for scrollbar\r\n      \r\n      \/\/ \u56fa\u5b9a\u30ec\u30a4\u30a2\u30a6\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u5c5e\u6027\u3092\u8a2d\u5b9a(table-layout=fixed \u304b\u3064 width\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u6307\u5b9a\u3055\u308c\u308b\u5fc5\u8981\u304c\u3042\u308b)\r\n      var tattr = {&quot;table-layout&quot;:&quot;fixed&quot;, &quot;width&quot;:&quot;100%&quot;};\r\n      table.css(tattr);\r\n      headerTable.css(tattr);\r\n      \r\n      if (cfg.cols) {\r\n        var cg = new Array();\r\n        $(cfg.cols).each(function(){\r\n          cg.push(&quot;&lt;col&quot;);\r\n          if (&quot;width&quot; in this) {\r\n            cg.push(&quot; width='&quot;);\r\n            cg.push(this.width);\r\n            cg.push(&quot;'&quot;);\r\n          }\r\n          cg.push(&quot;\/&gt;&quot;);\r\n        });\r\n        table.prepend(cg.join(&quot;&quot;));\r\n        \r\n        \/\/ for scrollbar\r\n        cg.push(&quot;&lt;col width='18px'\/&gt;&quot;);\r\n        headerTable.prepend(cg.join(&quot;&quot;));\r\n      }\r\n      \r\n      \/\/ \u69cb\u9020\u3092\u4f5c\u6210\r\n      table.wrapAll(&quot;&lt;div class='lightable-wrapper' style='width:100%;'&gt;&quot;\r\n              + &quot;&lt;div class='lightable-body-wrapper' style='overflow:auto;width:100%;&quot;\r\n              + &quot;height:&quot; + cfg.height + &quot;;'&gt;&lt;\/div&gt;&lt;\/div&gt;&quot;);\r\n\r\n      wrapper = table.closest(&quot;.lightable-wrapper&quot;);\r\n      wrapper.prepend(&quot;&lt;div class='lighttable-head-wrapper' style='overflow:hidden;width:100%;height:100%;'&gt;&lt;\/div&gt;&quot;);\r\n      \r\n      headWrapper = $(&quot;.lighttable-head-wrapper&quot;, wrapper); \r\n      bodyWrapper = table.closest(&quot;.lightable-body-wrapper&quot;);\r\n      headWrapper.prepend(headerTable);\r\n      \r\n      $(&quot;thead&quot; ,table).hide();\r\n      \r\n      bodyWrapper.scroll(function(){\r\n        headWrapper.scrollLeft(this.scrollLeft);\r\n      });\r\n    });\r\n  };\r\n})(jQuery);<\/pre>\n<h3>HTML (table_test.html)<\/h3>\n<p>\u3056\u3063\u304f\u308a\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<p>$(\u30c6\u30fc\u30d6\u30eb).lightable(\u30d1\u30e9\u30e1\u30fc\u30bf); \u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u9069\u7528<\/p>\n<p>\u3072\u3068\u3064\u9a5a\u3044\u305f\uff1f\u306e\u306f\u3001\u914d\u5217\u306e\u8981\u7d20\u306e\u6700\u5f8c\u306e\u30ab\u30f3\u30de\u304c\u3042\u308b\u304b\u7121\u3044\u304b\u3067\u3001IE \u3068Chrome \u3067jQuery.each() \u3067\u8fd4\u3055\u308c\u308b\u8981\u7d20\u6570\u304c\u7570\u306a\u308b\u3053\u3068\u3002<\/p>\n<p>\u3069\u3046\u3082\u3001[1,2,3,] \u3068\u3044\u3046\u69d8\u306a\u914d\u5217 \u306e\u5834\u5408\u3001IE \u3060\u3068\u3001\u6700\u5f8c\u306e\u30ab\u30f3\u30de\u306e\u5f8c\u306bnull \u304c\u3042\u308b\u3068\u5224\u65ad\u3057\u3066\u304b\u30014\u8981\u7d20\u51e6\u7406\u3055\u308c\u308b\u304c\u3001Chrome \u3060\u3068\u30013\u56de\u3057\u304b\u51e6\u7406\u3055\u308c\u306a\u3044\u69d8\u3060\u3002 <\/p>\n<pre class=\"prettyprint linenums\">&lt;!DOCTYPE html&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=shift-jis&quot;&gt;\r\n&lt;link rel=&quot;stylesheet&quot; type=&quot;text\/css&quot; href=&quot;.\/jquery\/css\/custom-theme\/jquery-ui-1.8.14.custom.css&quot; \/&gt;\r\n&lt;link rel=&quot;stylesheet&quot; type=&quot;text\/css&quot; href=&quot;.\/css\/lightable.css&quot; \/&gt;\r\n&lt;style type=&quot;text\/css&quot;&gt;\r\n.number {\r\n  text-align:right;\r\n}\r\n&lt;\/style&gt;\r\n&lt;title&gt;Lightable Test&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n  &lt;table id=&quot;tbl_dummy&quot; style=&quot;table-layout:fixed;width:100%;&quot;&gt;\r\n    &lt;thead&gt;\r\n      &lt;tr&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e01&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e02&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e03&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e04&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e05&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e06&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e07&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e08&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e09&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e010&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e011&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e012&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e013&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e014&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e015&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e016&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e017&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e018&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e019&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e020&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e021&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e022&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e023&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e024&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e025&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e026&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e027&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e028&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e029&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e030&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e031&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e032&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e033&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e034&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e035&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e036&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e037&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e038&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e039&lt;\/th&gt;\r\n        &lt;th&gt;\u30ab\u30e9\u30e040&lt;\/th&gt;\r\n      &lt;\/tr&gt;\r\n    &lt;\/thead&gt;\r\n    &lt;tbody&gt;\r\n    &lt;\/tbody&gt;\r\n  &lt;\/table&gt;\r\n\r\n\r\n  &lt;script type=&quot;text\/javascript&quot; src=&quot;.\/jquery\/js\/jquery-1.6.1.js&quot;&gt;&lt;\/script&gt;\r\n  &lt;script type=&quot;text\/javascript&quot; src=&quot;.\/jquery-ui\/js\/jquery-ui-1.8.14.custom.min.js&quot;&gt;&lt;\/script&gt;\r\n  &lt;script type=&quot;text\/javascript&quot; src=&quot;.\/js\/jquery.lightable.js&quot;&gt;&lt;\/script&gt;\r\n  &lt;script type=&quot;text\/javascript&quot; src=&quot;.\/dat.js&quot;&gt;&lt;\/script&gt;\r\n  &lt;script type=&quot;text\/javascript&quot;&gt;\r\n  $(function(){\r\n    \r\n    $(&quot;#tbl_dummy&quot;).lightable({\r\n      cols:[\r\n        {width:100,align:&quot;right&quot;},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100},\r\n        {width:200},\r\n        {width:300},\r\n        {width:100}\r\n          ]  ,\r\n          height:&quot;500px&quot;,\r\n    });  \r\n    loadDummyData();  \r\n  });  \r\n  function loadDummyData() {\r\n    var rows = getData();\r\n    var tb = $(&quot;#tbl_dummy&quot;);\r\n    var rb = null;\r\n    rb = new Array();\r\n    for (var i=0; i&lt;rows.length; i++) {\r\n      var cells = rows[i];\r\n      \r\n      rb.push(&quot;&lt;tr&gt;&quot;);\r\n      for (var j=0; j&lt;cells.length; j++) {\r\n        rb.push(&quot;&lt;td class='number'&gt;&quot;);\r\n        rb.push(cells[j]);\r\n        rb.push(&quot;&lt;\/td&gt;&quot;);\r\n      }\r\n      rb.push(&quot;&lt;\/tr&gt;&quot;);\r\n    }\r\n    \r\n    tb.append(rb.join(&quot;&quot;));\r\n  }\r\n  &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\/pre&gt;<p><\/p><\/pre>\n<h3>CSS (lightable.css)<\/h3>\n<p>CSS\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<pre class=\"prettyprint linenums\">div.lightable-wrapper {\r\n\tborder: 1px solid #DDD;\r\n}\r\ndiv.lightable-wrapper th {\r\n\tborder-width: 0 1px 1px 0;\r\n\tborder-style: solid;\r\n\tborder-color: #DDD;\r\n\tbackground: none;\r\n\tfont-weight: normal;\r\n\tpadding: 5px;\r\n}\r\ndiv.lightable-wrapper td {\r\n\tpadding: 5px;\r\n\tborder-width: 0 1px 1px 0;\r\n\tborder-style: solid;\r\n\tborder-color: #DDD;\r\n\tbackground: none;\r\n}<\/pre>\n<h3>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u4f5c\u6210 (dat.js)<\/h3>\n<p>\u9069\u5f53\u306b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u914d\u5217\u3092\u3064\u304f\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">function getData() {\r\n  var rows = [];\r\n  for (var i=0; i&lt;200; i++) {\r\n    var row = []; \r\n      row.push(i + 1);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 2&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 3&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 4&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 5&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 6&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 7&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 8&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 9&quot;);\r\n      row.push(&quot;\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf 10&quot;);\r\n                 :\r\n                 \u7565          \r\n                 :\r\n    rows.push(row);\r\n  }\r\n  return rows;\r\n}                 <\/pre>\n<p>\u3093\u30fc\u666e\u901a\u306b\u3001\u65e2\u306b\u3042\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u52d5\u3044\u3066\u304f\u308c\u308c\u3070\u5e78\u305b\u306a\u3093\u3060\u3051\u3069\u306a\u30fc<\/p>\n<p>\u9762\u5012\u304f\u3055\u3044\u3051\u3069\u3001\u3053\u308c\u3092\u30d9\u30fc\u30b9\u306b\u4f5c\u308a\u8fbc\u3093\u3067\u3044\u304f\u3057\u304b\u306a\u3044\u304b\u306a\u30fc<\/p>\n","protected":false},"excerpt":{"rendered":"<p>jQuery \u306e\u30c6\u30fc\u30d6\u30eb\u7528\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u753b\u9762\u306e\u63cf\u753b\u3001\u304a\u3088\u3073\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u305f\u3068\u304d\u306e\u53cd\u5fdc\u304c\u4f7f\u7528\u306b\u8010\u3048\u306a\u3044\u304f\u3089\u3044\u9045\u3059\u304e\u308b\u3002 \u307e\u3041\u3001\u4eca\u56de\u884c\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u5217\u304c\u6570\u5341\u3042\u308b\u3088\u3046\u306a\u30c6\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[26],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-jquery"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}