Skip to content

Commit

Permalink
Deploy version 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
giotiskl committed Jan 24, 2018
1 parent 52905f1 commit df829b3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Version 1.3.1
* Fix bug where Filterizr would not be instantiated if the .filtr-container had more than one class names

## Version 1.3.0
* Gave a corerewrite to the plugin, with ES6 and Babel, maintaining a backwards compatible API.
* Added tests for most important methods.
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.filterizr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filterizr",
"version": "1.3.0",
"version": "1.3.1",
"description": "Filterizr is a jQuery plugin that sorts, shuffles, searches and applies stunning filters over responsive galleries using CSS3 transitions and custom CSS effects",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @author Yiotis Kaltsikis
* @see {@link http://yiotis.net/filterizr}
* @version 1.3.0
* @version 1.3.1
* @license MIT License
*/

Expand All @@ -19,7 +19,7 @@ import DefaultOptions from './DefaultOptions';

// Extract .filterizr method on jQuery prototype
$.fn.filterizr = function() {
const selector = `.${this.get(0).className}`;
const selector = `.${$.trim(this.get(0).className).replace(/\s+/g, '.')}`;
const args = arguments;

// user is instantiating Filterizr
Expand Down
8 changes: 8 additions & 0 deletions tests/Filterizr.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ describe('Filterizr', () => {
it('should return a new instance of the Filterizr class', () => {
expect(filterizr instanceof Filterizr).toBe(true);
});

it('should still work on containers with multiple class names', () => {
$('.filtr-container').addClass('randomclass1 randomclass2');
const instantiateFreshFilterizr = () => {
new Filterizr('.filtr-container', DefaultOptions);
};
expect(instantiateFreshFilterizr).not.toThrowError();
});
});

describe('#destroy', () => {
Expand Down

0 comments on commit df829b3

Please sign in to comment.