Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

active js

// isotope cdn
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>

// init Isotope (portfolio-items)
var $grid = $('.grid').isotope({ });

// filter items on button click
$('.filter-button-group').on( 'click', 'button', function() {
  var filterValue = $(this).attr('data-filter');
  $grid.isotope({ filter: filterValue });
});

// add class active  in button 
 $('.portfolio-filter button').click(function () {
 $(this).addClass("active");
 $(this).siblings().removeClass('active');
 });

//isotope button list html
<div class="button-group filter-button-group">
  <button data-filter="*">show all</button>
  <button data-filter=".metal">metal</button>
  <button data-filter=".transition">transition</button>
  <button data-filter=".alkali, .alkaline-earth">alkali & alkaline-earth</button>
  <button data-filter=":not(.transition)">not transition</button>
  <button data-filter=".metal:not(.transition)">metal but not transition</button>
</div>

// isotope html containt
<div class="grid">
  <div class="element-item transition metal">...</div>
  <div class="element-item post-transition metal">...</div>
  <div class="element-item alkali metal">...</div>
  <div class="element-item transition metal">...</div>
  <div class="element-item lanthanoid metal inner-transition">...</div>
  <div class="element-item halogen nonmetal">...</div>
  <div class="element-item alkaline-earth metal">...</div>
  ...
</div>
Comment

activejs

A frontend Javascript framework
Comment

PREVIOUS NEXT
Code Example
Javascript :: mindfusion calendar 
Javascript :: how to fix eslint jsx not allowed in js 
Javascript :: how to create nav tab with javascript with validation to move to the next tab 
Javascript :: zeamster examples react node 
Javascript :: jQuery exclude exteranl link for images 
Javascript :: react createElement interactive button 
Javascript :: react generate ethereum address 
Javascript :: underscore js check boolean value 
Javascript :: javascript compute heading on too points 
Javascript :: automatic jquery interceptor with token 
Javascript :: vuejs filter array by dates 
Javascript :: using chalk and morgan together 
Javascript :: in object transform translate property concat with rotate value angular 7 
Javascript :: asjasfawepiowjpowlklkcdlkdLkdlkskskjskknisbsbu 
Javascript :: @use-it/event-listener npm 
Javascript :: defoult function atributes 
Javascript :: send props from one component to another on button click 
Javascript :: how to add make touchstart passive in jquery "3.4.0" 
Javascript :: what is event in function inside prantesisi 
Javascript :: redux http library 
Javascript :: grepper add code answer 
Javascript :: passing a variable to the width style div angular 
Javascript :: how to made disktop program on react website 
Javascript :: how to add functionality inside js object 
Javascript :: convert an iterable object to an array 
Javascript :: Merger Douplicate array Object 
Javascript :: Install React Navigation dependencies into main project folder 
Javascript :: replace with regex capture group 
Javascript :: symbols with object.assign 
Javascript :: spherical.computeheading javascript 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =