OK, new angle from previous question which I didn’t explain properly here:
Our dev site has the slider working perfectly here:
http://allblacks.01dev.co.nz/index.cfm?layout=dnaHome
However, we’ve just put the site live and it’s not working here:
http://www.allblacks.com/index.cfm?layout=dnaHome
I have isolated the problem to the following piece of code. The alert fires on the 01dev site, but not on the live site.
$(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')
});
});
});
Can someone help me understand this?
EDIT:
There’s already a $(document).ready… earlier on, as below:
(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')
});
});
});
We determined the problem was related to thickbox javascript not being called properly or some type of conflict. We moved the thickbox js call to the top of the list of js calls (ahead of the jQuery.js call) and this seemed to solve the problem.