Dotclear

Changeset 1990:64538e14d013 for admin


Ignore:
Timestamp:
09/21/13 22:31:46 (12 years ago)
Author:
Lepeltier kévin <kevin@…>
Branch:
help-fixed-js
Children:
1991:72ab5d2aff52, 1992:0288544bad00
Message:

Fixe help-button lors du scroll.

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/js/common.js

    r1946 r1990  
    221221 
    222222     $('#content').append(img); 
     223      
     224     // listen for scroll 
     225     var peInPage = $('#help-button').offset().top; 
     226     $('#help-button').addClass("floatable"); 
     227     var peInFloat = $('#help-button').offset().top; 
     228     $('#help-button').removeClass("floatable"); 
     229     $(window).scroll( 
     230          function() { 
     231               if ($(window).scrollTop() >= peInPage - peInFloat ) { 
     232                    $('#help-button').addClass("floatable"); 
     233               } else { 
     234                    $('#help-button').removeClass("floatable"); 
     235               } 
     236          } 
     237     ); 
    223238 
    224239     return this; 
  • admin/style/default.css

    r1975 r1990  
    11361136          border-top-left-radius: 1em; 
    11371137          } 
     1138     #help-button.floatable { 
     1139          border-radius: 2em; 
     1140          background-color: #f5f5f5; 
     1141          position: fixed; 
     1142          top: 10px; 
     1143          } 
    11381144.help-box { 
    11391145     display: none; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map