Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » HTML-CSS-PHP-JavaScript / JavaScript Codes » Disable Up-Down-Left-Right Scrolling In TouchScreen

Disable Up-Down-Left-Right Scrolling In TouchScreen

Now a days every site or blog have its mobile version or can be view on mobile devices that are so intelligent that can skip your codes means can scroll even you are stopping `overflow:none;` but that is not good for touch screen devices.

Now there are many codes available on web but here we have a simple little JavaScript snippet to Disable Up-Down-Left-Right Scrolling In TouchScreen devices so now use our little code to Disable Up-Down-Left-Right Scrolling In TouchScreen all devices perfectly.


1.) No JQuery File Added.
2.) Pure JavaScript Codes.
3.) No CSS Added.
4.) Simple And Fast Loading Code.
5.) Can Work With Any Mobile Browser.

How To Add In A WebPage?

1.) Just Go To Your “Web Page File”.
2.) Now “Copy” The Below Codes And “Paste” It To There Positions.
3.) “Save” It, Now You Are Done.


<script type='text/javascript'>
// Stop Up/Down/Left/Right Scrolling In TouchScreen
// Code From:

window.addEventListener("touchmove", function(event) {
}, false);



1.) JavaScript Is Ok For General Us. If You Are Pro, Then You Can Do Any Thing.

Last Words:

That’s all we have. If you have any problem with this code in your template then feel free to contact us with full explanation of your problem. We will reply you as time allow to us. Don’t forget to share this with your friends so they can also take benefit from it and leave your precious feedback in our comment form below. Happy blogging, See you in next article…

Recommended For You:
Emoji Picker For HTML Input Field Using Pure Vanilla JavaScript

You Like It, Please Share This Recipe With Your Friends Using...

2 Responses to “Disable Up-Down-Left-Right Scrolling In TouchScreen”

  1. Shaoor says:

    That’s quite handy and effective.
    I would definitely use it for my company website optimized for mobile.
    Thanks for sharing this post with us.

Leave a Reply

Your email address will not be published. Required fields are marked *