0

現在、InfiniteScrollが組み込まれたDesandroのjQueryMasonryを使用するサイトを構築しています。IEを除くすべてのブラウザーで見事に動作します(IE7とIE8でも問題なく動作します)。jQuery(function)がまったく実行されていないようです。内部にアラートを配置してテストしましたが、実行されません。IEDeveloperにエラーは表示されません。

これが私のコードとサイトへのリンクです:http ://www.elke.co/testimonials/

<script type="text/javascript">
  jQuery(function () {
    var $container = jQuery('#sort');

    $container.imagesLoaded(function () {

      $container.masonry({
        itemSelector: '.box',
        columnWidth: 100
      });
    });

    $container.infinitescroll({
      navSelector: '.navigation', // selector for the paged navigation 
      nextSelector: '.navigation .nav-previous a', // selector for the NEXT link (to page 2)
      itemSelector: '.box', // selector for all items you'll retrieve
      loading: {
        finishedMsg: 'No more pages to load.',
        img: 'http://www.elke.co/wp-content/themes/shaken-grid-free/images/ajax-loader.gif'
      }
    },
    // trigger Masonry as a callback
    function (newElements) {
      // hide new items while they are loading
      var $newElems = jQuery(newElements).css({
        opacity: 0
      });
      // ensure that images load before adding to masonry layout
      $newElems.imagesLoaded(function () {
        // show elems now they're ready
        $newElems.animate({
          opacity: 1
        });

        $container.masonry('appended', $newElems, true);
      });
    });
  });
</script>
4

1 に答える 1

1

私が見ているクロムでは:

Unsafe JavaScript attempt to access frame with URL http://www.elke.co/testimonials/ from frame with URL http://www.youtube.com/embed/g3V26BQ85IM. Domains, protocols and ports must match.

ある種のAJAXクロスドメインは間違って実行する必要があり、IEセキュリティは単に要求を拒否し、他の人は要求をスライドさせます。

于 2012-08-31T02:54:25.137 に答える