I am looking for a way to have a JavaScript/jQuery function which can be used as a full page slider on a function. My HTML structure is as follows:
Now I want to do two things:
- I want both
slide1
andslide2
to be full width elements. - Furthermore, I want a function that can be called to elegantly slide from
slide1
toslide2
and back if you call it again.
I found a solution in fullpage.js
, but that code has too much unwanted side effects (e.g., no vertical scrolling; centering of content; no smooth responsive resizing of font-size) and can do more things and therefore uses more code than I want.
I think it must be easy to accomplish in less lines, but I don't know how to go about it. I hope someone can provide me with some pointers on how to make two full-width divs (basically two "body-elements") that can be slided when calling a JavaScript/jQuery function.