title: Gallery Filtering using Jquery in Angular not working
body: <p>I am unable to call the jquery function from my angular html file. Basically, trying to apply filter on the gallery. When the cursor moves hovers over the another button it should display photos of those filter alone, however currently only 'All' photos are getting displayed and filtering isnt working.
  I have installed jquery and also added the below in the angular.json and restart the app, though not working. Any help to resolve this issue is highly appreciated.</p>
  <pre><code>    &quot;scripts&quot;: [&quot;node_modules/jquery/dist/jquery.min.js&quot;,
        &quot;node_modules/jquery/dist/jquery.js&quot;]
  </code></pre>
  <p>My html and js query is as below:</p>
  <pre><code>&lt;div class=&quot;mydiv&quot;&gt;
    &lt;div align=&quot;center&quot;&gt;
      &lt;br&gt;
      &lt;section&gt;
        &lt;ul&gt;
          &lt;li class=&quot;list active&quot; data-filter=&quot;all&quot;&gt;All Images&lt;/li&gt;
          &lt;li class=&quot;list&quot; data-filter=&quot;product&quot;&gt;Product Images&lt;/li&gt;
      &lt;li class=&quot;list&quot; data-filter=&quot;factory&quot;&gt;Factory Images&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/section&gt;
  
    &lt;/div&gt;
  
    &lt;div&gt;&lt;br&gt;&lt;/div&gt;
    &lt;div class=&quot;column&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
  
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox product&quot;&gt;&lt;img src=&quot;assets/Images/f3.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
  
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox factory&quot;&gt;&lt;img src=&quot;assets/Images/f4.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox product&quot;&gt;&lt;img src=&quot;assets/Images/f8.jpg&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox factory&quot;&gt;&lt;img src=&quot;assets/Images/f2.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class=&quot;row&quot;&gt;
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox product&quot;&gt;&lt;img src=&quot;assets/Images/f3.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
  
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox factory&quot;&gt;&lt;img src=&quot;assets/Images/f4.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox factory&quot;&gt;&lt;img src=&quot;assets/Images/f8.jpg&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class=&quot;responsive&quot;&gt;
          &lt;div class=&quot;gallery&quot;&gt;
            &lt;div class=&quot;itemBox product&quot;&gt;&lt;img src=&quot;assets/Images/f8.jpg&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;responsive&quot;&gt;
        &lt;div class=&quot;gallery&quot;&gt;
          &lt;div class=&quot;itemBox product&quot;&gt;&lt;img src=&quot;assets/Images/f3.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
  
      &lt;div class=&quot;responsive&quot;&gt;
        &lt;div class=&quot;gallery&quot;&gt;
          &lt;div class=&quot;itemBox factory&quot;&gt;&lt;img src=&quot;assets/Images/f4.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;responsive&quot;&gt;
        &lt;div class=&quot;gallery&quot;&gt;
          &lt;div class=&quot;itemBox product&quot;&gt;&lt;img src=&quot;assets/Images/f2.jpeg&quot;  width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class=&quot;responsive&quot;&gt;
        &lt;div class=&quot;gallery&quot;&gt;
          &lt;div class=&quot;itemBox factory&quot;&gt;&lt;img src=&quot;assets/Images/f3.jpeg&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;script src=&quot;https://code.jquery.com/jquery-3.6.0.js&quot;
              integrity=&quot;sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=&quot;
              crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
      &lt;script type=&quot;text/javascript&quot; src=&quot;function.js&quot;&gt;&lt;/script&gt;
    &lt;/div&gt;
    &lt;div class=&quot;clearfix&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>JS script:</p>
  <pre><code>$(document).ready(function(){
    $('.list').click(function(){
    const value = $(this).attr('data-filter');
    if (value == 'all'){
    $('.itemBox').show('1000');
    }
    else{
    $('.itemBox').not('.'+value).hide('1000');
      $('.itemBox').filter('.'+value).show('1000');
    }
    })
    //
    $('.list').click(function(){
    $(this).addClass('active').siblings().removeClass('active');
    })
  </code></pre>