• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Scrolling a page

 
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Again, I have looked at the JQuery and I must admit it is absolutely necessary to utilize it. I have not utilized JQuery in like 5 years and am a little scared by it.

I get this:

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>

gets added to the top of my page.

in terms of scrolling behavior, I just need it to scroll the whole cotton picking page. Not a button click, however, I do need to have a Start and Stop scroll button on there.

You said to manipulate the top but I am not sure how to do this. Can you help me out on this. I am really stumped on the whole thing. It is messing me up really bad on all the other fancy niceties everybody wants to have.

Thanks, Michele

 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, if you want to scroll the whole page, rather than an element on the page, you would likely want to read up on the jQuery scrollTop() method.

You can animate the scrolling by using that method in an interval timer.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
P.S. No need to be scared of jQuery. One of the great things about it is that you can use it a little, or a lot. It's not very invasive so you don't have to rewrite anything on a page in order to use it for something useful.

(Though it makes sense to use as much as possible, because it just makes everything easier, but you don't have to change the way your doing things in order to use it.)
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I looked and looked at examples of continuous vertical scrollers and found this one:

http://jsfiddle.net/midani222/ZqVgv/#base



Only thing is when I tried to add the JavaScript to the header, the file crashed.


I thought maybe I need to split it out as its own file, what is your opinion? I am waiting for it to be put into a directory so that I can reference it as a relative file from the header.

thanks, Michele

P.S. I modified it so that it mimics that behavior that I need it to do, it is pretty simple really.




Thanks again,
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic