Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #11 from acidvertigo/patch-1

Patch for bxgallery to work with jquery 1.6.x. Title "undefined" issue
  • Loading branch information...
commit d67ff5524345fdc465fbfb7b7d27fcdc48b7f856 2 parents d9580de + 9e3b29e
@haraldpdl haraldpdl authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 catalog/ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js
View
4 catalog/ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js
@@ -14,12 +14,12 @@ $orig.parent().find('#loading').css({'textAlign':'center','width':o.maxwidth});$
function preload_check(){i++;if(i==k){init();}}
function init(){set_layout();set_main_img();place_thumbcontainer();set_thumbs();}
function set_layout(){$orig.parent().find('#loading').hide();$orig.show();$orig.wrap('<div class="'+o.wrapperclass+'"></div>');$outer=$orig.parent();$orig.find('li').css({'position':'absolute'});}
-function set_main_img(){$orig.find('img').each(function(){var $this=$(this);var $imgheight=$this.height();var $imgwidth=$this.width();if($this.attr('title')!=''){caption=$this.attr('title');$this.parent().append('<div class="caption">'+caption+'</div>');}
+function set_main_img(){$orig.find('img').each(function(){var $this=$(this);var $imgheight=$this.height();var $imgwidth=$this.width();if($this.prop('title')!=''){caption=$this.prop('title');$this.parent().append('<div class="caption">'+caption+'</div>');}
if(o.maxwidth!=''){if($this.width()>o.maxwidth){$this.width(o.maxwidth);$this.height(($imgheight/$imgwidth)*o.maxwidth);}}
if(o.maxheight!=''){if($this.height()>o.maxheight){$this.height(o.maxheight);$this.width(($imgwidth/$imgheight)*o.maxheight);}}
if($this.height()+$this.parent().find('.caption').height()>tall){tall=$this.height()+$this.parent().find('.caption').height();}
if($this.width()>wide){wide=$this.width();}
-cont+='<li><img src="'+$this.attr('src')+'" /></li>';});$orig.find('li:not(:first)').hide();$orig.height(tall);$orig.width(wide);$outer.find('.caption').width(wide);}
+cont+='<li><img src="'+$this.prop('src')+'" /></li>';});$orig.find('li:not(:first)').hide();$orig.height(tall);$orig.width(wide);$outer.find('.caption').width(wide);}
function place_thumbcontainer(){if(o.thumbplacement=='top'){$outer.prepend('<ul class="thumbs">'+cont+'</ul>');$outer.find('.thumbs').css({'overflow':'auto'});}else if(o.thumbplacement=='left'){$outer.prepend('<ul class="thumbs">'+cont+'</ul>');$orig.css({'float':'left'});$outer.find('.thumbs').css({'float':'left'});}else if(o.thumbplacement=='bottom'){$outer.append('<ul class="thumbs">'+cont+'</ul>');}else if(o.thumbplacement=='right'){$outer.append('<ul class="thumbs">'+cont+'</ul>');$orig.css({'float':'left'});$outer.find('.thumbs').css({'float':'left'});}
$outer.append('<div style="clear:both"></div>');if(o.thumbcontainer!=''){$outer.find('.thumbs').width(o.thumbcontainer);}}
function set_thumbs(){$outer.find('.thumbs li').each(function(){var $this=$(this);var $img=$this.find('img');var $imgwidth=$img.width();var $imgheight=$img.height();if(o.thumbcrop){$img.width($imgwidth*o.croppercent);$img.height(($imgheight/$imgwidth)*$img.width());$this.css({'float':'left','width':o.thumbwidth,'height':o.thumbwidth,'overflow':'hidden','cursor':'pointer'});}else{$img.width(o.thumbwidth);$img.height(($imgheight/$imgwidth)*o.thumbwidth);$this.css({'float':'left','cursor':'pointer'});$this.height($img.height());}
Please sign in to comment.
Something went wrong with that request. Please try again.