私は少し初心者なので、このスクリプトが初歩的である場合は申し訳ありません。
jQuery の .load() 関数を使用して、作成した式エンジン サイトのイベント カレンダーの翌月または前月をロードしようとしています。次のスクリプトは、Chrome、Safari、IE、および Firefox 4 ベータ版では機能しますが、FF 3.6.10 では失敗します。
$('th a.right, th a.left, th a.center').click(function() {
var navMonth = $(this).attr("title");
$('#calendar').html('<p style="padding: 102px 120px;"><img src="http://dashboardco-op.org/images/infra/ajax-loader.gif" /></p>');
$('#calendar').load(navMonth);
});
そして、ここにhtmlがあります:
<th colspan="1"><a id="mc_prev_month" class="icon left" title="{path='live/calendar'}{prev_month format="%Y/%m"}/">←</a></th>
<th colspan="5"><a class="center" title="{path='live/calendar'}{next_month format="%Y/%m"}/">{month format="%F %Y"}</a></th>
<th colspan="1"><a id="mc_next_month" class="icon right" title="{path='live/calendar'}{next_month format="%Y/%m"}/">→</a></th>
.load() は「href」を上書きしないため、「title」属性を使用しています。したがって、ページは非同期ではなく新しいページに読み込まれます。
ありがとう。