equal
deleted
inserted
replaced
1 $(function(){ |
1 $(function(){ |
2 //masonry |
2 //masonry |
3 var container = $('.list-projets-3'); |
3 var masonry465 = $('.masonry-465'); |
4 container.masonry({ |
4 masonry465.masonry({ |
5 columnWidth: 465, |
5 columnWidth: 465, |
6 itemSelector: '.item', |
6 itemSelector: '.item-masonry', |
7 gutter : 20 |
7 gutter : 20 |
|
8 }); |
|
9 |
|
10 var masonry225 = $('.masonry-225'); |
|
11 masonry225.masonry({ |
|
12 columnWidth: 225, |
|
13 itemSelector: '.item-masonry', |
|
14 gutter : 16 |
8 }); |
15 }); |
9 //popin |
16 //popin |
10 $('.open-popin').bind('click', function(e){ |
17 $('.open-popin').bind('click', function(e){ |
11 e.preventDefault(); |
18 e.preventDefault(); |
12 var target = $(this).attr('href'); |
19 var target = $(this).attr('href'); |
25 |
32 |
26 $('.popin').bind('click', function(e){ |
33 $('.popin').bind('click', function(e){ |
27 e.stopPropagation(); |
34 e.stopPropagation(); |
28 }); |
35 }); |
29 //tag it |
36 //tag it |
30 var keywordsTagIt = $('.tag-it').tagit({ |
37 if($('.tag-it').length){ |
31 allowSpaces : true |
38 var keywordsTagIt = $('.tag-it').tagit({ |
32 }); |
39 allowSpaces : true |
33 $('.list-key-add a').bind('click', function(e){ |
40 }); |
34 e.preventDefault(); |
41 $('.list-key-add a').bind('click', function(e){ |
35 var tag = $(this).attr('data-tag'); |
42 e.preventDefault(); |
36 keywordsTagIt.tagit("createTag", tag); |
43 var tag = $(this).attr('data-tag'); |
37 }); |
44 keywordsTagIt.tagit("createTag", tag); |
38 |
45 }); |
|
46 } |
|
47 //filters |
|
48 $('.filters a').each(function(){ |
|
49 var text = $.trim($(this).text()); |
|
50 if(text.length > 30){ |
|
51 $(this).text(text.substr(0, 30) + '...') |
|
52 } |
|
53 }) |
39 |
54 |
40 });//ready |
55 });//ready |