How can I have #gotoTop on touch devices?

3 replies · opened Aug 8, 2017

Oo2manAug 8, 2017

I've noticed

body:not(.device-touch) #gotoTop {
	transition: background-color .2s linear;
	-webkit-transition: background-color .2s linear;
	-o-transition: background-color .2s linear;
}

which obviously does not show #gotoTop on touch devices. Nonetheless, I would really like to have it displayed as may content is pretty long. And scrolling to top manually is exhausting.

Thanks.

SSemicolon WebSTAFFAug 9, 2017

Hello,

This is Definitely Possible!

Simply add the data-mobile="true" Attribute to the #gotoTop Element and it will start displaying on Mobile Devices.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

VvilallongaAug 19, 2017

Where can I find the #gotoTop Element, in the function.js ?
Thank you

QQueenNaBAug 24, 2017

It's at the bottom of the html page, above the </body> tag.

If you want the button to show on mobile, change the tag on your html page to:

<div id="gotoTop" class="icon-angle-up" data-mobile="true"></div>

You can add that to any html page.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard