|
115
|
1 |
$(function(){ |
|
119
|
2 |
//masonry |
|
118
|
3 |
var container = $('.list-projets-3'); |
|
|
4 |
container.masonry({ |
|
|
5 |
columnWidth: 465, |
|
|
6 |
itemSelector: '.item', |
|
|
7 |
gutter : 20 |
|
|
8 |
}); |
|
119
|
9 |
//popin |
|
131
|
10 |
$('.open-popin').bind('click', function(e){ |
|
118
|
11 |
e.preventDefault(); |
|
119
|
12 |
var target = $(this).attr('href'); |
|
|
13 |
$('.popin-wrap').fadeIn(function(){ |
|
|
14 |
$(target).show(); |
|
|
15 |
}); |
|
|
16 |
}); |
|
|
17 |
|
|
|
18 |
$('.close-popin, .popin-wrap').bind('click', function(e){ |
|
|
19 |
e.preventDefault(); |
|
|
20 |
e.stopPropagation(); |
|
|
21 |
$('.popin-wrap').fadeOut(function(){ |
|
|
22 |
$('.popin').hide(); |
|
|
23 |
}); |
|
|
24 |
}); |
|
|
25 |
|
|
|
26 |
$('.popin').bind('click', function(e){ |
|
|
27 |
e.stopPropagation(); |
|
118
|
28 |
}); |
|
128
|
29 |
//tag it |
|
|
30 |
var keywordsTagIt = $('.tag-it').tagit({ |
|
|
31 |
allowSpaces : true |
|
|
32 |
}); |
|
|
33 |
$('.list-key-add a').bind('click', function(e){ |
|
|
34 |
e.preventDefault(); |
|
|
35 |
var tag = $(this).attr('data-tag'); |
|
|
36 |
keywordsTagIt.tagit("createTag", tag); |
|
|
37 |
}); |
|
|
38 |
|
|
|
39 |
|
|
115
|
40 |
});//ready |