How to disable horizontal scrolling using jquery?

How to prevent horizontal scrolling using jquery?

I know that I know. It would be better to use CSS (overflow-x), but firefox has an error that prevents me from using this :(

EDIT:

Here is an explanation of why I am looking for this.

  • Using Firefox can be found here: www.simplymichele.com
  • Play with it, move around, grab and swipe your finger across the screen, etc., to become familiar with how it works.
  • With Firebug, remove the following code from the stylesheet:

.gecko #content {overflow: auto; }

Resets #content to:

overflow-x: hidden; overflow-y: auto;

  • Now try moving around. See how Firefox returns to the first slide after it scrolls to another page (do you need to double-click the navigation link so that it remains)? This only happens in Firefox, I don’t know why. This is why I called it FF error. Now it may be a scrollTo plugin error, not sure what it is.

Random note: the bottom horizontal scrollbar is hidden in firefox under the navigation div. To view it, change #content height with Firebug.

... now that I have explained why I need this intricate side scroll control method in firefox, could you vote for me to zero? You are welcome:)

+4
source share
1 answer

Could you use the jquery.css () function to do this?

Unfortunately, I don't have access to firefox right now, since I'm on a Mac, but I use jquery a lot, and it seems like you can do something like:

$('.gecko #content').css('overflow-x', 'hidden'); 

if this does not work, then I do not know any ... sorry

+3
source

All Articles