Your location:Home>开发控件 版本控制 >开发控件

Isotope

Filtering

Isotope can hide and show item elements with the filter option. Items that match that filter will be shown. Items that do not match will be hidden.

Selectors

The simplest way to filter items is with selectors, like classes. For example, each item element can have several identifying classes: transition, metal, lanthanoid, alkali, etc.

Set a selector with the filter option. Items that match the selector will be shown. Items that do not match will be hidden.

jQuery selectors

Isotope uses jQuery to filter items (if jQuery is present). You can filter items with jQuery selectors.

Functions

You can filter with functions. The example at the top of this page uses a function to filter items when the item’s number is greater than 50.

If you use jQuery, you can filter with functions in jQuery.

You can still filter with functions if you don’t use jQuery.

UI

The example at the top uses buttons for UI. Each button has its filter set in the data-filter attribute.

In the JS, we can use that filter when a button is clicked.

Filter functions

To filter with a function, use a keyword and map it to an object.

Other UI

Your UI does not have to be buttons. You can use

北京哲想软件有限公司