orbit4-5/app/assets/javascripts/lib/items/items.js.erb

29 lines
683 B
Plaintext
Raw Normal View History

var Items = function(){
var i = this;
this.initialize = function(){
i.bindHandlers();
}
this.bindHandlers = function(){
var $openSlide = $('.open-slide'),
$pageslideW;
$(window).width() > 1440 ? $pageslideW = 1024 : $pageslideW = 954;
$(window).resize(function() {
$(this).width() > 1440 ? $pageslideW = 1024 : $pageslideW = 954;
});
$iFrame = $openSlide.filter('.view-page.open-slide');
$iFrame.pageslide({
W: $pageslideW,
iframe: true
});
}
this.reBindHandlers = function(){
$.pageslide.close();
window.openSlide();
i.bindHandlers();
}
i.initialize();
}
itemsLibrary = new Items();