---
title: "Horizontal scrolling Internal Anchor Links click with jquery"  
description: "Horizontal scrolling Internal Anchor Links click with jquery"  
author: "Anonymous User"  
published: 2013-04-06  
updated: 2013-04-06  
canonical: https://www.mindstick.com/forum/719/horizontal-scrolling-internal-anchor-links-click-with-jquery  
category: "jquery"  
tags: ["jquery"]  
reading_time: 2 minutes  

---

# Horizontal scrolling Internal Anchor Links click with jquery

Hi!\
\
I use jquery for horizontal scrolling with mousewheel.It is work ..\
\

```
 $('html').mousewheel(function (event, delta) {            this.scrollLeft += (delta * 50);            event.preventDefault();        });
```

I want horizontal scrolling [Internal](https://www.mindstick.com/interview/773/describe-the-accessibility-modifier-protected-internal) Anchor [Links](https://www.mindstick.com/blog/415/css3-links) [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social),\
\
**I use this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) :**\
\

```
   $(".prevscroll").click(function (event) {               event.preventDefault();               $.scrollTo(this.hash, 150, { easing: 'elasout' });        });or  $(window).scrollLeft((Number($(window).scrollLeft()) + 50) + 'px');or $('body').scrollLeft(50);
```

but don't scrolling !!!!\
**\
My [html](https://www.mindstick.com/articles/1530/design-a-simple-stylish-calculator-using-html-css-and-javascript) code**\
\

```
<script type='text/javascript' src="js/jquery.mousewheel.min.js"></script><script type='text/javascript' src="js/jquery.min.js"></script><script type='text/javascript' src="js/jquery.mousewheel.js"></script><style> .content {padding: 20px 20px 0;display: block;z-index: 1;height: 340px;position: relative;}#contentWrapper{position: absolute;max-width: 100%;min-width: 400px;min-height: 350px;padding: 0 20px 30px 20px;z-index: 1;} </style><div style="display: block;top:107px" id="contentWrapper">  <a class="prevscroll"></a>   <div style="margin-right: 0px;" id="content">    //My content   </div></div>
```

## Replies

### Reply by Vijay Shukla

Hi!\
You can try as following\

```
$(".prevscroll").click(function (event) {            $('html, body').scrollLeft($('html, body').scrollLeft()+150);              event.preventDefault();        });
```

\

### Reply by AVADHESH PATEL

Hi Ankita!\
Bind mousewheel function with body and replace -= to +=\

```
$(function() {    $("body").mousewheel(function(event, delta) {        var $this = $(this);        this.scrollLeft -= (delta) * 50;        event.preventDefault();    });});
```

\
I hope it helpful you!\


---

Original Source: https://www.mindstick.com/forum/719/horizontal-scrolling-internal-anchor-links-click-with-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
