source: branches/2.5/themes/smartpocket/js/smartpocket.js @ 26010

Last change on this file since 26010 was 13472, checked in by patdenice, 12 years ago

Multisize and mobile theme.
Use ajax loader for thumbnails in mobile theme.
Use standard square parameters for mobile theme.
Change square parameters to 120px.

File size: 572 bytes
Line 
1(function(window, $, PhotoSwipe){
2  $(document).ready(function(){
3    var options = {
4      jQueryMobile: true,
5      imageScaleMethod: "fitNoUpscale"
6    };
7    $(".thumbnails a").photoSwipe(options);
8    $(document).bind('orientationchange', set_thumbnails_width);
9    set_thumbnails_width();
10  });
11}(window, window.jQuery, window.Code.PhotoSwipe));
12
13function set_thumbnails_width() {
14  nb_thumbs = Math.max(3, Math.ceil($('.thumbnails').width() / 130));
15  width = Math.floor(1000000 / nb_thumbs) / 10000;
16  $('.thumbnails li').css('width', width+'%');
17}
Note: See TracBrowser for help on using the repository browser.