Blame view

app/js/demo/gallery.js 714 Bytes
feacde5ff   Rishav   setup acuefuel in...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  $(function () {
  	
  $('.gallery-container > li').hoverIntent({
  		over: showPreview,
  	     timeout: 500,
  	     out: hidePreview,
  	     sensitivity: 4
  	});
  	
  	function showPreview () {
  		$(this).find ('.preview').fadeIn ();
  	}
  	
  	function hidePreview () {
  		$(this).find ('.preview').fadeOut ();
  	}
  	
  	setTimeout (function () {
  		$('.gallery-container > li').each (function () {
  			var preview, img, width, height;
  			
  			preview = $(this).find ('.preview');
  			img = $(this).find ('img');
  			
  			width = img.width ();
  			height = img.height ();
  			
  			preview.css ({ width: width });
  			preview.css ({ height: height });
  			
  			preview.addClass ('ui-lightbox');
  		});
  	}, 500);
  	
  });