Changeset 11912
- Timestamp:
- Aug 5, 2011, 5:52:44 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/css/autosize.css
r11442 r11912 28 28 29 29 } 30 #the_page{ margin-top:-4px; 31 32 position:static ; 30 #the_page { 31 margin-top: -4px;position:static ; 33 32 34 33 } -
extensions/Autosize/js/Affiche_script.js
r11442 r11912 407 407 408 408 jQuery(Parent).width(winwidth); 409 jQuery(Parent).height(winheight);409 // jQuery(Parent).height(winheight); 410 410 411 411 var Cadre = jQuery(Parent).get(0); … … 725 725 726 726 h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); 727 if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top; 727 728 if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top|0; 728 729 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; 729 730 //========================================================================= … … 734 735 //========================================================================= 735 736 if (typeof (Bandeau_bas) != "undefined") { 736 Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);737 Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top|0 + Bandeau_bas.marge.bottom|0); 737 738 } else { 738 739 } … … 1156 1157 } else { 1157 1158 if (pos_copyright.top > 100) { 1158 jQuery("#the_page").height(pos_copyright.top);1159 // jQuery("#the_page").height(pos_copyright.top); 1159 1160 } 1160 1161 } -
extensions/Autosize/js/JScript.js
r11442 r11912 1 1 jQuery(document).ready( 2 2 function (jQuery) { 3 stb = jQuery('#scrolltobottom'); 4 stt = jQuery('#scrolltotop'); 5 stt.css('opacity', 1 ) 3 var stt = jQuery('#scrolltobottom'); 4 var stb = jQuery('#scrolltotop'); 5 6 7 stt.css('opacity', 1); 8 var scrollBottom = 0; 9 6 10 //=================================================================== 7 jQuery(window). resize(function (event, ui) {11 jQuery(window).load(function (event, ui) { 8 12 if (typeof (event) == 'undefined') return; 9 scrollBottom = jQuery(window).scrollTop( );10 });13 scrollBottom = jQuery(window).scrollTop(0); 14 var v_max = jQuery("#the_page").height(); 11 15 //=================================================================== 12 16 jQuery(window).scroll(function () { 13 if (scrollBottom < 500) { 14 if (stt.css('opacity') > 0) { 15 stt.stop().fadeTo(1000, 0); 16 stt.css("display", "none"); 17 scrollBottom = jQuery(window).scrollTop(); 18 v_max = jQuery("#the_page").height() - jQuery(window).height(); 19 if (scrollBottom > 100) { 20 if (stt.css('opacity') == 0) { 21 stt.stop().fadeTo(1000, 1); 22 } 23 } 24 if (scrollBottom > v_max - 100) { 25 if (stb.css('opacity') == 0) { 26 stb.stop().fadeTo(1000, 1); 27 } 28 } 29 return; 30 31 if (scrollBottom < v_max) { 32 if (stb.css('opacity') > 0) { 33 stb.stop().fadeTo(1000, 0); 34 stb.css("display", "none"); 35 } 17 36 } else { 37 if (stb.css('opacity') == 0) { 38 stb.stop().fadeTo(1000, 1); 39 stb.css("display", "block"); 40 } 41 } 42 43 //========================================= 44 if (scrollBottom < v_max) { 18 45 if (stt.css('opacity') == 0) { 19 46 stt.stop().fadeTo(1000, 1); 20 47 stt.css("display", "block"); 21 }22 }23 }24 25 if (scrollBottom < 500) {26 if (stb.css('opacity') == 0) {27 stb.stop().fadeTo(1000, 1);28 stb.css("display", "block");29 30 48 } 31 49 } else { 32 if (stb.css('opacity') > 0) {33 stb.stop().fadeTo(1000, 0);34 stb.css("display", "none");50 if (stt.css('opacity') > 0) { 51 stt.stop().fadeTo(1000, 0); 52 stt.css("display", "none"); 35 53 36 54 } … … 38 56 39 57 }); 58 }); 40 59 41 60 jQuery('#scrolltobottom a').click(function () { 42 pos = jQuery(' body').outerHeight();61 pos = jQuery('#the_page').outerHeight(); 43 62 jQuery('html, body').animate({ 44 63 scrollTop: pos + 'px' 45 64 }, 1000, function () { 46 scrollBottom = jQuery(window).scrollTop(); 47 if (stb.css('opacity') > 0) { 48 stb.stop().fadeTo(1000, 0); 49 stb.css("display", "none"); 50 stt.stop().fadeTo(1000, 1); 51 stt.css("display", "block"); 52 } 65 66 stt.stop().fadeTo(1000, 0); 67 stb.stop().fadeTo(1000, 1); 68 53 69 }); 54 70 }); … … 60 76 scrollTop: pos + 'px' 61 77 }, 1000, function () { 62 st = false; 63 // scrollBottom = jQuery(window).scrollTop(); 64 if (stb.css('opacity') > 0) { 65 stt.stop().fadeTo(1000, 0); 66 stt.css("display", "none"); 67 stb.stop().fadeTo(1000, 1); 68 stb.css("display", "block"); 69 } 70 scrollBottom = jQuery(window).scrollTop(); 78 stb.stop().fadeTo(1000, 0); 79 stt.stop().fadeTo(1000, 1); 71 80 }); 72 81 }); … … 75 84 function gotoPos(pos) { 76 85 jQuery('html, body').animate({ scrollTop: jQuery('body').outerHeight() + 'px' }, 77 600, function () {78 86 0, function () { 87 scrollBottom = jQuery(window).scrollTop(); 79 88 80 89 }); … … 84 93 } 85 94 //=================================================================== 86 jQuery(window).resize();95 // jQuery(window).resize(); 87 96 jQuery(window).scroll(); 88 97 -
extensions/Autosize/template/mes_scripts.tpl
r11442 r11912 28 28 {/literal} 29 29 {/html_head} 30 <div id="scrolltobottom"><a title=" Revenir en bas de la page" href="#"></a></div>30 <div id="scrolltobottom"><a title="Aller en bas de la page" href="#"></a></div> 31 31 <div id="scrolltotop" ><a title="Revenir en haut de la page" href="#"></a></div> 32 32 {literal}
Note: See TracChangeset
for help on using the changeset viewer.