Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/469.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/80.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 - Fatal编程技术网

Javascript 使用jquery的过滤器按钮是什么

Javascript 使用jquery的过滤器按钮是什么,javascript,jquery,Javascript,Jquery,我有一个jQuery: $(".utente1").click(function () { $('.newdiv').hide(); $('.hidecolor').find('.vc_single_image-img').css('filter','grayscale(100%)'); $(".utente-1").show(600); $('.utente1').find('.img').css('filter','

我有一个jQuery:

 $(".utente1").click(function () {

            $('.newdiv').hide();

$('.hidecolor').find('.vc_single_image-img').css('filter','grayscale(100%)');

            $(".utente-1").show(600);   

      $('.utente1').find('.img').css('filter','none')
    })
当我单击其他按钮时,按钮Utene1 remaning filter:无


当我单击.Utene1时,它会打开div,但我希望按钮.Utene1也能更改颜色。

在Utene1中添加此代码单击:

$(this).css('color','red');
因此,您的完整代码将是:

$(".utente1").click(function () {
        $('.newdiv').hide();
        $(".utente-1").show(600);  
        $(this).css('color','red');
 });
如果要更改所有按钮的颜色。为这些按钮添加一个comman类,然后设置css:

 $(".utente1").click(function () {
            $('.newdiv').hide();
            $(".utente-1").show(600);  
            $(".commanClass").css('color','red');
     });

请输入完整的HTML代码OK抱歉,我已经插入了颜色过滤器。。例如过滤器:灰度100%;我解析了$'.utete-1-'.find'.img'.css'filter','none'