Friday, March 29 2024 @ 01:16 AM JST

Geeklog upgrade注意点: jQuery1.9 マイグレートプラグインの活用

  • Wednesday, October 09 2013 @ 02:25 AM JST
  • 投稿者:
  • 表示回数 6,824
Geeklog

Geeklog 2.0.0では、jQuery v1.9.1が同梱され、次期バージョンGeeklog 2.1.0では、現リポジトリを見るとjQuery v1.10.2が同梱されるようです。

Geeklog 1.8で活用していたjQueryの関数が動かなくなった場合、jQueryのMigrate pluginが提供されているので、それを読み込むことで一気に解決します。

たとえば、jQuery 1.9からliveが使えなくなっています。
コンソールには以下のエラーが表示。
Uncaught TypeError: Object [object Object] has no method ‘live’

https://github.com/jquery/jquery-migrate/blob/1.2.1/README.md

対策:

Geeklog のテーマfooter.thtml

from:

{plg_footercode}

to:
{plg_footercode}
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>