Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 砖石/同位素-过滤器在URL中可见_Php_Jquery_Jquery Isotope_Masonry - Fatal编程技术网

Php 砖石/同位素-过滤器在URL中可见

Php 砖石/同位素-过滤器在URL中可见,php,jquery,jquery-isotope,masonry,Php,Jquery,Jquery Isotope,Masonry,我遇到了一个奇怪的问题。我的主题的同位素代码如下: jQuery(document).ready(function($) { //ISOTOPE MAIN var $container = $('#isotope-container'); $container.imagesLoaded( function(){ $container.isotope({ itemSelector: '.isotope-item',

我遇到了一个奇怪的问题。我的主题的同位素代码如下:

jQuery(document).ready(function($) {
    //ISOTOPE MAIN
    var  $container = $('#isotope-container');
        $container.imagesLoaded( function(){
        $container.isotope({
         itemSelector: '.isotope-item',
         filter: '.home',
         resizesContainer: true
    });

    //ISOTOPE FILTER
    $(function(){
        var $container = $('#isotope-container');
            optionFilter = jQuery('#filter'),
            optionFilterLinks = optionFilter.find('a');

        optionFilterLinks.attr('href', '#');

        optionFilterLinks.click(function(){
            var selector = jQuery(this).attr('data-filter');
           $container.imagesLoaded( function(){
            $container.isotope({
                filter : '.' + selector,
                itemSelector : '.isotope-item',
                resizesContainer: true,
            });
                });
            // Highlight the correct filter
            optionFilterLinks.removeClass('active');
            jQuery(this).addClass('active');
            return false;
        });
    });

    //ISOTOPE INFINITE SCROLLING
    $(function(){
      $container.infinitescroll({
            navSelector  : '#page_nav',
            nextSelector : '#page_nav a',
            itemSelector : '.isotope-item',
            loading: {
                loadingText: 'Loading',
                finishedMsg: 'Done Loading',
                img: ''
              }
            },

            function( newElements ) {
              var $newElems = $( newElements ).css({ opacity: 0 });
              $newElems.imagesLoaded(function(){
                $newElems.animate({ opacity: 1 });
                $container.isotope( 'appended', $newElems, true );
                $('.format-video').fitVids('appended', $newElems);  
              });

              //CALL FUNCTIONS IN Bean_Isotope.callAfterNewElements
              for(var i = 0; i < Bean_Isotope.callAfterNewElements.length; i++) {
                Bean_Isotope.callAfterNewElements[i].call();
              }
            }
          );
      });


    });

});
jQuery(文档).ready(函数($){
//同位素干管
var$container=$(“#同位素容器”);
$container.imagesLoaded(函数(){
$container.com({
itemSelector:“.Isotoid项”,
筛选器:'.home',
resizesContainer:正确
});
//同位素过滤器
$(函数(){
var$container=$(“#同位素容器”);
optionFilter=jQuery(“#过滤器”),
optionFilterLinks=optionFilter.find('a');
optionFilterLinks.attr('href','#');
optionFilterLinks。单击(函数(){
var选择器=jQuery(this).attr('data-filter');
$container.imagesLoaded(函数(){
$container.com({
筛选器:'.'+选择器,
itemSelector:“.Isotoid项”,
resizesContainer:对,
});
});
//突出显示正确的过滤器
optionFilterLinks.removeClass('active');
jQuery(this.addClass('active');
返回false;
});
});
//无限滚动
$(函数(){
$container.infinites卷({
导航选择器:“#页面导航”,
下一个选择器:“#页面导航a”,
itemSelector:“.Isotoid项”,
装载:{
loadingText:“正在加载”,
FinishedMg:“完成加载”,
img:'
}
},
函数(新元素){
var$newElems=$(newElements).css({opacity:0});
$newElems.imagesLoaded(函数(){
$newElems.animate({opacity:1});
$container.同位素('added',$newElems,true);
$('.format video').fitVids('追加',$newElems);
});
//Bean_.callAfterNewElements中的调用函数
for(var i=0;i
我想将以下解决方案合并到其中:

但是,当我简单地复制并粘贴jquery时,它就不起作用了。在我的URL中没有显示任何筛选器

另外,我对我的问题有一个简短的描述。在我的主页(index.php)上,我通过同位素显示项目。在其他页面中,如bio/contact/places,我想也会显示一个过滤器菜单(我可以这样做),它指向index.php+,我想添加过滤器。例如

如果有人将在生物页面,将点击过滤器菜单“.home”,他应该被引导到我的主页(index.php)并应用过滤器