File tree Expand file tree Collapse file tree 1 file changed +21
-12
lines changed Expand file tree Collapse file tree 1 file changed +21
-12
lines changed Original file line number Diff line number Diff line change 97
97
< script src ="https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/2.2.2/isotope.pkgd.min.js "> </ script >
98
98
< script >
99
99
$ ( window ) . load ( function ( ) {
100
- var $container = $ ( '#componentContainer' ) ;
100
+ var $isotope = $ ( '#componentContainer' ) . isotope ( {
101
+ filter : '.featured' ,
102
+ animationOptions : {
103
+ duration : 750 ,
104
+ easing : 'linear' ,
105
+ queue : false
106
+ } ,
107
+ masonry : {
108
+ columnWidth : 210
109
+ } ,
110
+ getSortData : {
111
+ title : function ( itemElem ) {
112
+ var title = $ ( itemElem ) . find ( '.title' ) . text ( ) ;
113
+ return title ? title . toLowerCase ( ) : '' ;
114
+ }
115
+ } ,
116
+ sortBy : 'title'
117
+ } ) ;
101
118
102
119
function updateHash ( newHash ) {
103
120
if ( 'replaceState' in history ) {
123
140
$ ( '.filter-button-group a.current' ) . removeClass ( 'current' ) ;
124
141
$ ( '.filter-button-group a[href=' + hash + ']' ) . addClass ( 'current' ) ;
125
142
126
- $container . isotope ( {
127
- filter : filter ,
128
- animationOptions : {
129
- duration : 750 ,
130
- easing : 'linear' ,
131
- queue : false
132
- } ,
133
- masonry : {
134
- columnWidth : 210
135
- }
136
- } ) ;
143
+ $isotope . isotope ( {
144
+ filter : filter
145
+ } ) ;
137
146
}
138
147
139
148
jQuery ( '.filter-button-group a' ) . click ( function ( ) {
You can’t perform that action at this time.
0 commit comments