2012-11-08 8 views
0

OK, 내가 제대로 here 설명하지 않았다 이전 질문에서 새로운 각도를 .load슬라이더

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') 
       }); 
      }); 
     }); 

누군가 나를 이해하도록 도와 줄 수 있습니까?

편집 : 이미 $ (문서)있다 .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') 
       }); 
      }); 
     }); 

답변

0

우리는 문제가 없습니다 JavaScript가되지 올바르게 또는 충돌의 어떤 종류의 호출되는 Thickbox와 관련되었다 결정했다. thickbox js 호출을 js 호출 목록의 맨 위로 옮겼습니다 (jQuery.js 호출보다 앞서).이 문제를 해결하는 것처럼 보였습니다.

0

내가 사용하는 것이 좋습니다 것, 그것은 나에게

 $(document).ready(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') 
      }); 
     }); 
    }) 
+0

감사합니다. 내 편집을 참조하십시오 OP – user460114

+0

아, 모든 것을 바꿉니다. 위의 대답은이 경우 정확합니다. –

1

실패 결코 당신 $(window).load()$(document).ready() 안에 할당하면 안됩니다. 너무 늦었으므로 내부에 있으면 안됩니다.

이 시도

...

(function ($) { 
    "use strict"; 

    $(document).ready(function() { 
     var html = $('html'), 
      body = $('body'), 
      header = $('.header'), 
      searchTrigger = $('.search'), 
      searchPane = $('.search-pane'); 

     html.removeClass('no-js'); 

     $('.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') 
      }); 
     }); 
    }); 
});