source: extensions/LLGBO2/js/jquery_llgboframeresize.js @ 31744

Last change on this file since 31744 was 30224, checked in by gbo, 10 years ago

improve frame size when using zoom in browser -> ctrl +/-

File size: 845 bytes
RevLine 
[14421]1// LLGBO frame resize
[29049]2jQuery(document).ready( function(){
3                function LlgboFr_Resize()
4                 {      var Elmgbo = jQuery("#llgbo0");
5                        if (Elmgbo.size() > 0) 
6                         {      var MainImg = jQuery("#theMainImage");
7                                if (MainImg.size() > 0)
[30224]8                                   {   var nImgH = parseFloat(MainImg.height() ); 
9                                                var nImgW = parseFloat(MainImg.width() );
[29049]10                                                var FrLstBdr = 0; var frbdr=0;
11                                                jQuery(".llgboFR").each(function(){ 
[30224]12                                                        frbdr = parseFloat(jQuery(this).css('border-top-width')); 
[29484]13                                                        FrLstBdr = (frbdr * 2)+FrLstBdr; 
[29049]14                                                        });
[30224]15                                        }                                               
[28990]16                                Elmgbo.width (nImgW + FrLstBdr) ;
17                                Elmgbo.height (nImgH + FrLstBdr) ; 
[30224]18                                               
19                                               
[29841]20                        }       
[29049]21                }
[29841]22                 
23                LlgboFr_Resize();
24         
25                jQuery(window).resize(function(){ 
[29049]26                                LlgboFr_Resize(); });
27                       
[30224]28                jQuery("#theMainImage").load(function(){ ;
[29049]29                                LlgboFr_Resize();});
30 });
31
32
33
Note: See TracBrowser for help on using the repository browser.