jQuery同位素筛选在Safari和Chrome中不起作用

jQuery同位素筛选在Safari和Chrome中不起作用,jquery,google-chrome,safari,jquery-isotope,Jquery,Google Chrome,Safari,Jquery Isotope,我正在使用同位素过滤wordpress中基于类别的帖子。在Firefox中一切正常,但在Safari和Chrome中过滤不起作用。当我单击过滤器项时,动画不会发生。定位是很好的交叉。Safari和Chrome都没有在错误控制台中报告任何错误,所以我不知道出了什么问题 以下是Safari中输出的html: 过滤器导航: <div id="isotope-nav"> <div class="gallery-fillter-wrapper"> <s

我正在使用同位素过滤wordpress中基于类别的帖子。在Firefox中一切正常,但在Safari和Chrome中过滤不起作用。当我单击过滤器项时,动画不会发生。定位是很好的交叉。Safari和Chrome都没有在错误控制台中报告任何错误,所以我不知道出了什么问题

以下是Safari中输出的html:

过滤器导航:

<div id="isotope-nav">
    <div class="gallery-fillter-wrapper">
        <select class="gallery-filter">
            <option>-- Filter galleries --</option>
            <option data-filter="*" class="isotope-nav-item">All galleries</option>                                                       <option data-filter=".art-exhibitions" class="isotope-nav-item">Art Exhibitions</option> 
                                                              <option data-filter=".historical-photos-exhibition" class="isotope-nav-item">Historical photos Exhibition</option> 
                                                              <option data-filter=".other-exhibitions" class="isotope-nav-item">Other exhibitions</option> 
                                                              <option data-filter=".springtime-in-the-royal-compound" class="isotope-nav-item">Springtime in The Royal Compound</option> 
                                                              <option data-filter=".summer-at-the-royal-compound" class="isotope-nav-item">Summer at The Royal Compound</option> 
                                                              <option data-filter=".the-artwork-of-the-month" class="isotope-nav-item">The Artwork of the Month</option> 
                                                                  <option data-filter=".the-regalia" class="isotope-nav-item">The Regalia</option> 
                                                              <option data-filter=".trh-prince-peter,-prince-philip-and-prince-alexander" class="isotope-nav-item">TRH Prince Peter, Prince Philip and Prince Alexander</option> 
                                                        </select>
    </div><!-- end .gallery-filter-wrapper -->
</div>

我想出来了。问题是,在webkit浏览器中,选择
标记不能像单击一样工作,因此我将导航转换为链接、
标记,所有内容都可以在浏览器中正常工作

<div id="gallery-wrapper" style="position: relative; overflow: hidden; height: 1745px;" class="isotope">                                
    <div class="child-page-thumb art-exhibitions isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px);">
    </div><!-- end .child-page-thumb -->
    <div class="child-page-thumb art-exhibitions isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(239px, 0px, 0px);">
    </div><!-- end .child-page-thumb -->
    <div class="child-page-thumb art-exhibitions isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(478px, 0px, 0px);">
    </div><!-- end .child-page-thumb -->
    <div class="child-page-thumb historical-photos-exhibition isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(239px, 161px, 0px);">
    </div><!-- end .child-page-thumb -->
    <div class="child-page-thumb historical-photos-exhibition isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(478px, 161px, 0px);">
    </div><!-- end .child-page-thumb -->
    <div class="child-page-thumb historical-photos-exhibition isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 203px, 0px);">
    </div><!-- end .child-page-thumb -->
    <div class="child-page-thumb other-exhibitions isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(239px, 343px, 0px);">
    </div><!-- end .child-page-thumb -->
</div>
var cell_width = $('.child-page-thumb').outerWidth();
var cell_height = $('.child-page-thumb').outerHeight();
$container = $('#gallery-wrapper');

$container.isotope({
    layoutMode: 'masonry'
});

$('#isotope-nav option').click(function(){
    $selector = $(this).attr('data-filter');
    $container.isotope({filter: $selector});
    return false;
});