SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Using JQuery

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Using JQuery

    Hi I am new to JQuery and I am trying to get the cursor to move to the middle of a page instead of the top when I click a link on another page. Any suggestions?

    Thanks

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,700
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    You can place a unique identifier at the middle of the page, and navigate to that page with the identifier as a location reference.

    For example, a div has an id of "jackContainer", which is some way down the page.

    Code html4strict:
    <div id="jackContainer">

    You have the page load and scrolled down with that section at the top of the page by loading the following location:

    http://www.devinrolsen.com/jquery-zlayers-plugin/#jackContainer

    The #jackContainer at the end is a reference to the element with that id attribute.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •