sneaky fixed header
This commit is contained in:
parent
cb49d1f4ea
commit
47cf614996
2 changed files with 16 additions and 1 deletions
|
|
@ -4,6 +4,16 @@
|
|||
*/
|
||||
var View = {
|
||||
initialize: function() {
|
||||
|
||||
$(window).scroll(function(){
|
||||
var header = $('header');
|
||||
if( $(this).scrollTop() > 30){
|
||||
header.addClass('fixit');
|
||||
} else {
|
||||
header.removeClass('fixit');
|
||||
}
|
||||
});
|
||||
|
||||
/* Buttons */
|
||||
$("input:submit").addClass("button");
|
||||
|
||||
|
|
|
|||
|
|
@ -136,11 +136,16 @@ header
|
|||
:top 2px
|
||||
:color #CCC
|
||||
|
||||
:position fixed
|
||||
:position absolute
|
||||
|
||||
:width 100%
|
||||
:top 0
|
||||
:left 0
|
||||
|
||||
&.fixit
|
||||
:position fixed
|
||||
:top -30px
|
||||
|
||||
a
|
||||
:color #CCC
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue