同位素和砌体 jQuery 插件的区别

我最近发现了 砖石工程同位素 JQuery 插件。它们在功能上几乎完全相同而且似乎是同一个作者。唯一明显的区别就是执照。

这两者在功能上的主要区别是什么? 为什么要使用一个而不是另一个?

51561 次浏览

An excerpt from the interview with the author:

To some people Isotope would look very similar to the work you had previously done with Masonry; can you explain the main differences between the two?

Isotope has several features that Masonry lacks. Masonry essentially does one thing, placing item elements in a cascading arrangement. Isotope has Masonry’s layout logic built in, but in addition, it also has several other layout modes that can be used to dynamically position elements. You can even develop your own custom layout mode.

As I’ve mentioned, it has filtering and sorting functionality built in. Filtering items is as easy as passing in a jQuery selector:

$('#container').isotope({ filter: '.my-selector' });

Isotope takes advantage of the best browser features out there. Instead of using typical left/top styles positioning, Isotope takes a progressive enhancement approach and uses CSS transforms if supported by the browser. This provides for top-notch performance for top-notch browsers. With hardware acceleration kicking in, animations look silky smooth on WebKit browsers, and even less-powerful devices using iOS. CSS transforms perform better with CSS transitions, which I’ll discuss later.

Another difference is license as @AminAriana pointed out. Masonry is under the MIT license, but Isotope is only free for personal use.

You can buy (25$) Isotope commercial license on this page.

PrimosK pretty much answared you question, but I just wanted to chime in ...

Isotope is an awesome jQuery plugin. I've successfully used it on multiple sites.

One of the things I like most about Isotope is how customizable it is. It's well documented and it can do almost anything you can think of like extending it with infinite scroll and use custom layout modes.