javascript - Position text above fixed text with CSS -


is possible can keep heading above some other area text @ times - when user begins scrolling page?

how do css/jquery?

demo: http://jsfiddle.net/h49p65qa/

css:

* {    margin: 0;    padding: 0;  }  .site-wrap {     padding:40px 0 }  .some-other-area { }  h1 {     position:fixed;     z-index:1;     top:0;     margin:0; }  h2 {   padding: 0px;     margin: 0px 0 20px 0; }  .floatingheader {     position: fixed;     top: 0;     visibility: hidden; } 

thank you

is looking for?

js:

var el = $(this),    offset = el.offset(),    scrolltop = $(window).scrolltop() + 50,    floatingheader = $(".floatingheader", this)

css:

.floatingheader {      position: fixed;      top: 50px;      visibility: hidden;  }

demo: http://jsfiddle.net/h49p65qa/3/


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -