dalphyx / vue-headroom

Headroom for Vuejs
128 stars 16 forks source link

Is there a way to trigger headroom apart from scrolling? #7

Closed afontcu closed 7 years ago

afontcu commented 7 years ago

Hi, I'm trying to show the headroom component on a button click. Is there an easy way?

I have looked into the component code but I couldn't find anything. I also tried to force a window.scrollTo(0, 0) but that didn't trigger the component, and I cannot scroll to another pixel value because... well, because that'd be weird :)

Thanks!

dalphyx commented 7 years ago

@afontcu the original design idea of headroom.js is show/hide header by scrolling or resizing page. So I think there is no other way to trigger headroom.

samburgers commented 7 years ago

@afontcu you could try toggling the state of disabled when you need to show the header, and probably add fixed position if you dont already