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
Javascript Jquery用于实现数据过滤器_Javascript_Jquery_Jquery Isotope - Fatal编程技术网

Javascript Jquery用于实现数据过滤器

Javascript Jquery用于实现数据过滤器,javascript,jquery,jquery-isotope,Javascript,Jquery,Jquery Isotope,我是第一次尝试使用Jquery同位素插件为我的一个html模板实现数据过滤器。在浏览器控制台中找不到任何错误,但数据过滤器不起作用 这是我的密码: HTML <div class="ui-group" style="margin-left: 20%; margin-top: 2%;"> <h3 class="ui-group__title">Filter</h3> <div class="f

我是第一次尝试使用Jquery同位素插件为我的一个html模板实现数据过滤器。在浏览器控制台中找不到任何错误,但数据过滤器不起作用

这是我的密码: HTML

<div class="ui-group" style="margin-left: 20%; margin-top: 2%;">
                <h3 class="ui-group__title">Filter</h3>
                <div class="filters button-group js-radio-button-group">
                  <button class="button is-checked" data-filter="*"> All </button>
                  <button class="button" data-filter=".instances"> Instances </button>
                  <button class="button" data-filter=".images"> Images </button>
                  <button class="button" data-filter=".deployments"> Deployments </button>
                </div>
            </div>
            <div class="list_of_members">
            {% for instance in user.instances.all %}
                <div class="orders instances" style="margin-bottom: 2%;">
                    <div class="icon-text">
                        <h3>{{ instance.name }}</h3>
                        <p><b><strong style="color: orange">Server :</strong> </b><br>{{ instance.serverFile }} <br></p><br>
                        <p><b><strong style="color: orange">Package.json :</strong> </b><br>{{ instance.jsonPackageFile }}</p>
                    </div>
                </div>
                {% endfor %}
            {% for image in user.images.all %}
                <div class="orders  images" style="margin-bottom: 2%;">
                    <div class="icon-text">
                        <h3>{{ image.tagName }}</h3>
                        <p><b><strong style="color: orange">Instance :</strong> </b><br>{{ image.instance }} <br></p><br>
                        <p><b><strong style="color: orange">Created By :</strong> </b><br>{{ image.user.username }}</p>
                    </div>
                </div>
                {% endfor %}
            </div>

滤器
全部的
实例
图像
部署
{%例如user.instances.all%中的实例}
{{instance.name}
服务器:
{{instance.serverFile}}

Package.json:
{{instance.jsonPackageFile}

{%endfor%} {%用于user.images.all%中的图像} {{image.tagName} 实例:
{{image.Instance}}

创建人:
{{image.user.username}

{%endfor%}
加载Jquery后的Javascript部分

<script src="{% static 'js/isotope.pkgd.min.js' %}"></script>
<script>
    // Activate isotope with Jquery filter for instances,images and deployments
    $('.list_of_members').isotope({
        itemSelector: '.orders',
        layoutMode: 'fitRows'
    });
    // Isotope click function
    $('.button').click(function(){
        $('.button').removeClass('is-checked');
        $(this).addClass('is-checked');

        var selector = $(this).attr('data-filter');
        $('.list_of_members').isotope({
            filter: selector
        });
        return false;
    });
</script>

//使用Jquery过滤器激活实例、映像和部署
$(“.成员列表”).同位素({
itemSelector:“.orders”,
布局模式:“fitRows”
});
//同位素点击功能
$('.button')。单击(函数(){
$('.button').removeClass('is-checked');
$(this.addClass('is-checked');
变量选择器=$(this.attr('data-filter');
$(“.成员列表”).同位素({
过滤器:选择器
});
返回false;
});
我的代码中是否存在任何问题或错误配置? 请帮帮我