- Timestamp:
- Jan 12, 2014, 10:03:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/stripped-galleria/galleria/themes/classic/galleria.classic.js
r12975 r26671 1 1 /** 2 * @preserve Galleria Classic Theme 2011-08-013 * http://galleria. aino.se2 * Galleria Classic Theme 2012-08-08 3 * http://galleria.io 4 4 * 5 * Copyright (c) 2011, Aino 6 * Licensed under the MIT license. 5 * Licensed under the MIT license 6 * https://raw.github.com/aino/galleria/master/LICENSE 7 * 7 8 */ 8 9 9 /*global jQuery, Galleria */ 10 (function($) { 10 11 11 Galleria.requires(1.25, 'This version of Classic theme requires Galleria 1.2.5 or later'); 12 13 (function($) { 12 /*global window, jQuery, Galleria */ 14 13 15 14 Galleria.addTheme({ … … 26 25 init: function(options) { 27 26 27 Galleria.requires(1.33, 'This version of Classic theme requires Galleria 1.3.3 or later'); 28 28 29 // add some elements 29 30 this.addElement('info-link','info-close'); … … 34 35 // cache some stuff 35 36 var info = this.$('info-link,info-close,info-text'), 36 touch = Galleria.TOUCH, 37 click = touch ? 'touchstart' : 'click'; 37 touch = Galleria.TOUCH; 38 38 39 39 // show loader & counter with opacity … … 49 49 // toggle info 50 50 if ( options._toggleInfo === true ) { 51 info.bind( click, function() {51 info.bind( 'click:fast', function() { 52 52 info.toggle(); 53 53 }); … … 72 72 } 73 73 } else { 74 $(e.thumbTarget).css('opacity', this.getIndex() ? 1 : 0.6); 74 $(e.thumbTarget).css('opacity', this.getIndex() ? 1 : 0.6).bind('click:fast', function() { 75 $(this).css( 'opacity', 1 ).parent().siblings().children().css('opacity', 0.6); 76 }); 75 77 } 76 78 }); 79 80 var activate = function(e) { 81 $(e.thumbTarget).css('opacity',1).parent().siblings().children().css('opacity', 0.6); 82 }; 77 83 78 84 this.bind('loadstart', function(e) { … … 80 86 this.$('loader').show().fadeTo(200, 0.4); 81 87 } 82 88 window.setTimeout(function() { 89 activate(e); 90 }, touch ? 300 : 0); 83 91 this.$('info').toggle( this.hasInfo() ); 84 85 $(e.thumbTarget).css('opacity',1).parent().siblings().children().css('opacity', 0.6);86 92 }); 87 93
Note: See TracChangeset
for help on using the changeset viewer.