OK、ここで適切に説明しなかった前の質問からの新しい角度:
私たちの開発サイトでは、ここでスライダーが完全に機能しています。
http://allblacks.01dev.co.nz/index.cfm?layout=dnaHome
ただし、サイトを公開したばかりで、ここでは機能していません。
http://www.allblacks.com/index.cfm?layout=dnaHome
問題を次のコードに切り分けました。アラートは 01dev サイトで発生しますが、ライブ サイトでは発生しません。
$(window).load(function () {
$('.wraplines a, .wraplines .wrapspan').wraplines().addClass('wrapped clearfix');
alert('here');
$('.carousel').each(function () {
$(this).Waterfall({
autoStart: $(this).data('autostart'),
startAt: $(this).data('startat'),
infiniteScroll: $(this).data('infinitescroll'),
hasPager: $(this).data('haspager')
});
});
});
誰かがこれを理解するのを手伝ってくれますか?
編集: 以下のように、既に $(document).ready... が既にあります。
(function ($) {
"use strict";
$(document).ready(function () {
var html = $('html'),
body = $('body'),
header = $('.header'),
searchTrigger = $('.search'),
searchPane = $('.search-pane');
html.removeClass('no-js');
$(window).load(function () {
$('.wraplines a, .wraplines .wrapspan').wraplines().addClass('wrapped clearfix');
alert('here');
$('.carousel').each(function () {
$(this).Waterfall({
autoStart: $(this).data('autostart'),
startAt: $(this).data('startat'),
infiniteScroll: $(this).data('infinitescroll'),
hasPager: $(this).data('haspager')
});
});
});