zippy1978 / jquery.scrollz

Modern scrolling for jQuery
GNU General Public License v2.0
81 stars 17 forks source link

Hide pullheader by default #2

Closed jerone closed 11 years ago

jerone commented 11 years ago

I was hoping you could implement an option to hide the pullheader by default (not disabled).

Now I have to call method hidePullHeader after the page is fully ready (otherwise I get shocking animations, but that a side), with result that the pullheader is shown for a brief second.

I'm using jQuery Mobile, so beside an option in the constructor, a data-attribute would be great.

zippy1978 commented 11 years ago

Hi, I'll try to do that as soon as I can...

zippy1978 commented 11 years ago

I just pushed a new release where you can use a parameter with hidePullHeader to hide pull header with or without animation (so that you wont't see the header hiding anymore). Here is what you can do to make sure pull header wont appear at page loading time :

$(":jqmData(role='page')").live("pageshow", function() {

  $(":jqmData(scrollz='pull')").scrollz('hidePullHeader', false);     

});

Hope this will help :)

jerone commented 11 years ago

Thanks! I was more looking for a setting, but this will work too.