Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion base.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

jQuery(function($){
$('.bar').mosaic({
animation : 'slide'
animation : 'slide',
easeIn : 'swing',
easeOut : 'linear'
});
});

Expand Down
20 changes: 11 additions & 9 deletions js/mosaic.1.0.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
(function($){

if(!$.omr){
$.omr = new Object();
};
$.omr = {};
}

$.omr.mosaic = function(el, options){

Expand Down Expand Up @@ -39,8 +39,8 @@

$(window).load(function(){
// IE transparency fade fix
if(base.options.options.animation == 'fade' && $(base.options.overlay, base.el).css('opacity') == 0 ) $(base.options.overlay, base.el).css('filter', 'alpha(opacity=0)');
if(base.options.options.animation === 'fade' && $(base.options.overlay, base.el).css('opacity') === 0 ) $(base.options.overlay, base.el).css('filter', 'alpha(opacity=0)');

$(base.options.overlay, base.el).fadeIn(200, function(){
$(base.options.backdrop, base.el).fadeIn(200);
});
Expand Down Expand Up @@ -72,8 +72,8 @@
// Handle slide animations
case 'slide':
// Grab default overlay x,y position
startX = $(base.options.overlay, base.el).css(base.options.anchor_x) != 'auto' ? $(base.options.overlay, base.el).css(base.options.anchor_x) : '0px';
startY = $(base.options.overlay, base.el).css(base.options.anchor_y) != 'auto' ? $(base.options.overlay, base.el).css(base.options.anchor_y) : '0px';;
var startX = $(base.options.overlay, base.el).css(base.options.anchor_x) !== 'auto' ? $(base.options.overlay, base.el).css(base.options.anchor_x) : '0px';
var startY = $(base.options.overlay, base.el).css(base.options.anchor_y) !== 'auto' ? $(base.options.overlay, base.el).css(base.options.anchor_y) : '0px';

var hoverState = {};
hoverState[base.options.anchor_x] = base.options.hover_x;
Expand All @@ -84,13 +84,13 @@
endState[base.options.anchor_y] = startY;

$(base.el).hover(function () {
$(base.options.overlay, base.el).stop().animate(hoverState, base.options.speed);
$(base.options.overlay, base.el).stop().animate(hoverState, base.options.speed, base.options.easeIn);
},function () {
$(base.options.overlay, base.el).stop().animate(endState, base.options.speed);
$(base.options.overlay, base.el).stop().animate(endState, base.options.speed, base.options.easeOut);
});

break;
};
}
};

// Make it go!
Expand All @@ -101,6 +101,8 @@
animation : 'fade',
speed : 150,
opacity : 1,
easeIn : 'swing',
easeOut : 'swing',
preload : 0,
anchor_x : 'left',
anchor_y : 'bottom',
Expand Down
11 changes: 1 addition & 10 deletions js/mosaic.1.0.1.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.