integration/v2/js/main.js
changeset 138 f694df1f57a6
parent 133 d7aecea73e6d
child 146 6691086f43fd
equal deleted inserted replaced
137:854e655ac468 138:f694df1f57a6
    18 	masonry225.masonry({
    18 	masonry225.masonry({
    19 	  columnWidth: 225,
    19 	  columnWidth: 225,
    20 	  itemSelector: '.item-masonry',
    20 	  itemSelector: '.item-masonry',
    21 	  gutter : 16
    21 	  gutter : 16
    22 	});
    22 	});
       
    23 
       
    24 	function masonry177(){
       
    25 		var masonry177 = $('.masonry-177');
       
    26 		masonry177.masonry({
       
    27 		  columnWidth: 177,
       
    28 		  itemSelector: '.item-masonry'
       
    29 		});
       
    30 	}
       
    31 	masonry177();
    23 //popin
    32 //popin
    24 	$('.open-popin').bind('click', function(e){
    33 	$('.open-popin').bind('click', function(e){
    25 		e.preventDefault();
    34 		e.preventDefault();
    26 		var target = $(this).attr('href');
    35 		var target = $(this).attr('href');
    27 		$('.popin-wrap').fadeIn(function(){
    36 		$('.popin-wrap').fadeIn(function(){
    49 			e.preventDefault();
    58 			e.preventDefault();
    50 			var tag = $(this).attr('data-tag');
    59 			var tag = $(this).attr('data-tag');
    51 			keywordsTagIt.tagit("createTag", tag);
    60 			keywordsTagIt.tagit("createTag", tag);
    52 		});
    61 		});
    53 	}
    62 	}
       
    63 //mosaic
       
    64 	$('.toggle-comment').bind('click', function(e){
       
    65 		e.preventDefault();
       
    66 		$('.show-comment, .hide-comment').hide();
       
    67 		if($('.mosaic').length){
       
    68 			$('.mosaic').removeClass('mosaic').addClass('mosaic-comment');
       
    69 			$('.hide-comment').show();
       
    70 		}else{
       
    71 			$('.mosaic-comment').removeClass('mosaic-comment').addClass('mosaic');
       
    72 			$('.show-comment').show();
       
    73 		}
       
    74 		masonry177();
       
    75 	});
    54 
    76 
       
    77 	$('.display-keyword').bind('click', function(e){
       
    78 		e.preventDefault();
       
    79 		var li = $(this).parents('li'),
       
    80 			keyword = $(this).attr('data-keyword');
       
    81 		if(li.hasClass('disabled')){
       
    82 			$('li.keyword-'+keyword).find('.curtain').hide();
       
    83 			li.removeClass('disabled');
       
    84 		}else{
       
    85 			$('li.keyword-'+keyword).find('.curtain').show();
       
    86 			li.addClass('disabled');
       
    87 		}
       
    88 		
       
    89 	});
    55 	
    90 	
    56 });//ready
    91 });//ready