vukhanhtruong / jquery-elastic-grid

jQuery Elastic Grid is a lightweight, easy to use gallery jquery plugin script inspired by Google Image Search with support for .PNG, .JPG and .GIF image files. It uses a thumbnail grid with expanding preview for displaying your images. It is also fully HTML5 and CSS3 compliant.
57 stars 32 forks source link

Improved Tag/Filter Class Creation #18

Open aakashchoubey opened 6 years ago

aakashchoubey commented 6 years ago

This update will make the class to be added to the <li> tag in grid a single word instead of multiple words (multiple classes). Currently,

var a="two words", 
a.toLowerCase().replace(' ','-') = "two-words".

var a="more than two words",
a.toLowerCase().replace(' ','-') = "more-than two words"   //which creates more than one classes.

Fix -> a.split(' ').join('-') = "more-than-two-words which is a single word, thus a single class.