Forum Replies Created
-
Author
-
sarpdiegoParticipant
Sorry for my bad english,
i Have this script to make swipe interactions for Smartphone and Tablet users
COPY CODE<script> document.addEventListener('touchstart', handleTouchStart, false); document.addEventListener('touchmove', handleTouchMove, false); var xDown = null; var yDown = null; function handleTouchStart(evt) { xDown = evt.touches[0].clientX; yDown = evt.touches[0].clientY; }; function handleTouchMove(evt) { if ( ! xDown || ! yDown ) { return; } var xUp = evt.touches[0].clientX; var yUp = evt.touches[0].clientY; var xDiff = xDown - xUp; var yDiff = yDown - yUp; if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {/*most significant*/ if ( xDiff > 0 ) { /* left swipe */ /* Here the Side Menu close */ } else { /* right swipe */ /*Here the side Menu open */ } } else { if ( yDiff > 0 ) { /* up swipe */ } else { /* down swipe */ } } /* reset values */ xDown = null; yDown = null; }; </script>
i comment out the section where i want to open and to close the side menu.
i hide the top menu for mobile users because i dosn’t like it, i want a smarter look of the menu, like facebook.
so what i need is a function like opensidemenu(); and closesidemenu();im not a js pro maybe you can ask the programmer of the side menu(or are you the programmer?) what code i exactly need to open the side menu and close the side menu.
sarpdiegoParticipantno, i know that the theme officaly dont support a swpie menu, so i want to make a own. what i meen is what must i type in javascript to open the menu and what must i type in to close it, i dont talk about a toggle function.
sarpdiegoParticipantok, i make me a javascript that alerts me if i swipe right or left with the finger over my touchscreen(on phones and tablets) so i want a open and close comand for the swipe menu. sorry for my bad english, i hope you understand what i mean and what i want. 🙂
sarpdiegoParticipanti only found this in the theme JS
COPY CODEsideMenu: function() { f(".open-sidebar").on("click", function() { f("body").toggleClass("offcanvas-open"); f(".offcanvas-sidebar").toggleClass("is-open"); return false }); f(".kleo-page").on("click", function(o) { if (f(o.target).hasClass("open-sidebar") || f(o.target).closest(".open-sidebar").length > 0) { return } f("body").removeClass("offcanvas-open"); f(".offcanvas-sidebar").removeClass("is-open") }) },
sarpdiegoParticipant*bump* that could be realy helpfull to make mobile version of websites more confortable.
sarpdiegoParticipanta MyCreed integration would be cool. I want to see the mycreed ranks in the forum treads.
Another cool feature.Another cool feature would own mobile settings section.
Where can I set such as the menu will displayed on mobile phones. my customers have strong problems with the mobile version. here is improvement needed.sarpdiegoParticipantNo it dosn’t work for me. the menu are visible.
The exact problam what i have is this:The site need a perfect mobile view. the standart side menu of kleo is nice but i can’t open it with mobile gestures(swipe the finger fast from left to right)
so i want to use a plugin what makes a new mobile menu with this feature. but now i have 2 menus, the old top menu and the new plugin menu. so the standart menu from kleo must complete hidden.I hope that explains better what my problem is.
Sorry for the bad englisch.
-
AuthorPosts