+ 1

How to make swipe view with Tabs in JavaScript

like android

21st Jan 2017, 10:56 AM
Mohammed Elhafed Messini
Mohammed Elhafed Messini - avatar
8 odpowiedzi
+ 5
^_^
21st Jan 2017, 5:37 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
If you plan it for a web site, you should provide a navigation fallback for non-touch display ( swipe is a finger movement concept, you need at least emulate it with the mouse events, or have another way to allow user to navigate in yours tabs ^^ )... Anyway, to do it, you need two mainly knowlegde range: - events handling, in particular gesture and mouse events - html/css tab-like designing, with containers able to be positioned and animated My advice is to start with a minimal content design, and implement firstly a simple 'switch' tabs view ( display/hyde on tab change ). Then, elaborate/improve your design... and only finally try to upgrade towards a 'swipe view' ;)
21st Jan 2017, 11:38 AM
visph
visph - avatar
+ 2
Sure: I'll go compil and rewriting courses for all that stuff into two or three line of text :P I guive you directions, guidelines, try to catch a side and hold tight trying to implement it... Along your progression, ask for more specific problems, and we try to help you to resolve them ^^
21st Jan 2017, 5:34 PM
visph
visph - avatar
+ 2
A simple example for the first step ( show/hide groups of elements on click/tap, without swipe gesture control ): https://code.sololearn.com/Wu90AADbb3l0/#html
21st Jan 2017, 7:44 PM
visph
visph - avatar
+ 1
And to study touch events ( starting point for a gesture handler ): https://code.sololearn.com/WO8wrPV40Fzn/#js References: https://developer.mozilla.org/en-US/docs/Web/API/Touch_events Else, to avoid managing yourself a gesture handler, you can try a specialized library as 'hammer.js': http://hammerjs.github.io/recognizer-swipe/ A 'plugin' for JQuery also exist, but seems limited to binding the basic touch events, without providing gesture events...
21st Jan 2017, 9:07 PM
visph
visph - avatar
0
ok can you tell me
21st Jan 2017, 1:02 PM
Mohammed Elhafed Messini
Mohammed Elhafed Messini - avatar
0
thank you @visph
21st Jan 2017, 7:26 PM
Mohammed Elhafed Messini
Mohammed Elhafed Messini - avatar
0
thank you @visph
21st Jan 2017, 7:26 PM
Mohammed Elhafed Messini
Mohammed Elhafed Messini - avatar