v-back-to-top on toolbar
-
hey, is there a way to use v-back-to-top directive on the toolbar like twitter?
<div class=“toolbar” v-back-to-top>
<!-- Toolbar title -->
<q-toolbar-title :padding=“1”>
Title
</q-toolbar-title>
<button>
<i>mail</i>
</button>
</div>that what i did but seems not working
-
Back to top directive is supposed to make the node/component it is applied to to show only when a certain scroll threshold has been exceeded. If you want the toolbar to scroll to top when clicked then just add
@click
event which does this. Find the scrolling node and set.scrollTop
native JS property to0
. If you want animation with that, then use the Animate API (http://quasar-framework.org/api/js-utils.html#Animate) to set this property. -
this solved it, thank you