Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to scroll to left on html?
    primarykey
    data
    text
    <p>I am building a single page website. I have common website stuff on it like: services, portfolio, contact, blog, etc.</p> <p>If someone clicks the navigation menu for 'services', 'portfolio' and 'contact' it scrolls to the item that the user wants. Normally this is up and down scrolling so there is no problem.</p> <p>The idea I have is when the user wants to go to the blog, it scrolls to the right or make a push effect of the blog coming from right to left. Right know I have something working. The problem is that when I am on the last section, which is contact, this is at the bottom of the page. If I want to go to the blog it is scrolling to the top and then to the right to see the blog.</p> <p>I am pretending to remove that scroll to the top, and just make a right scroll and see the blog section from the top.</p> <p>Any idea on how to handle this? Or would it be better to have an independent html file?</p> <p><strong>Edit</strong></p> <p><a href="http://jsfiddle.net/VS9dS/20/" rel="nofollow">http://jsfiddle.net/VS9dS/20/</a></p> <p>scroll from blog to any section and/or moving from any section up or down.</p> <pre><code>$('html, body').animate({scrollLeft: -$(sectionName).offset().left}, "slow"); $('html, body').animate({scrollTop: $(sectionName).offset().top}, "slow"); </code></pre> <p>scroll from any section to the blog:</p> <pre><code>$('html, body').animate({scrollTop: $(sectionName).offset().top}, "slow");}; $('html, body').animate({scrollLeft: $(sectionName).offset().left}, "slow"); </code></pre> <p>I didn't add much code for the lack of time. Right now is working on my code that if I'm on contact section and I click the blog contact it scrolls to the top and then scrolls right to the blog section, and blog section looks like a complete different html. What I would like it to do is the if I'm on contact section and clic to the blog just do a left scroll and show the top of the blog, and the same way if I'm on services, home</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload