javascript - Sticky headers for mobile browser -


i making sticky header works on touch screen, using hammer.js touch gestures:

    scrollevent: function () {         hammer('.desktop', {             drag_block_horizontal: true,             drag_lock_to_axis: true,             release: false         }).on("drag", function (event) {             $('#steg1').css({ position: "fixed" });         });                 }, 

html:

<div class="desktop" id="desk1">    <ul>       <li>           <strong id="steg1">steg1</strong>                                                                      </li>       <li>           <strong>steg2</strong>       </li>     </ul>                                        </div>   

the header remains sticky while dragging on screen, problem header disapears when finger released screen , swipe scrolling page, header apears again after scrolling stopped. (this tested on iphone 4s/5).

so function understands drag performance not when finger released screen, appreciated!


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -