integration/v2/js/main.js
author Anthony Ly <anthonyly.com@gmail.com>
Thu, 20 Jun 2013 15:03:13 +0200
changeset 128 5ce3313fb21d
parent 119 9d2a4916ee7a
child 131 f7f6c6acf9b9
permissions -rwxr-xr-x
add tag it plugin

$(function(){
//masonry
	var container = $('.list-projets-3');
	container.masonry({
	  columnWidth: 465,
	  itemSelector: '.item',
	  gutter : 20
	});
//popin
	$('.new-collection').bind('click', function(e){
		e.preventDefault();
		var target = $(this).attr('href');
		$('.popin-wrap').fadeIn(function(){
			$(target).show();
		});
	});

	$('.close-popin, .popin-wrap').bind('click', function(e){
		e.preventDefault();
		e.stopPropagation();
		$('.popin-wrap').fadeOut(function(){
			$('.popin').hide();
		});
	});

	$('.popin').bind('click', function(e){
		e.stopPropagation();
	});
//tag it
	var keywordsTagIt = $('.tag-it').tagit({
		allowSpaces : true
	});
	$('.list-key-add a').bind('click', function(e){
		e.preventDefault();
		var tag = $(this).attr('data-tag');
		keywordsTagIt.tagit("createTag", tag);
	});
	
	
});//ready