SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile On mouse hoover page move

    Hi,

    I need a script which will move to a certain position in the website when it is hoovered by the mouse

    I have this not working-bad script:

    PHP Code:
    <a href="http://www.w3.org/" onmouseover="<a href="#anynameyoulike">">W3C</a
     
     
      
    <a name="anynameyoulike"></a

    Thanks in advance!

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's not an advisable thing for a link to do, but try this:

    Code:
    <a href="http://www.w3.org/" onmouseover = "location.href = '#anynameyoulike';">W3C</a>
    Tab-indentation is a crime against humanity.

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Logic Ali View Post
    That's not an advisable thing for a link to do, but try this:

    Code:
    <a href="http://www.w3.org/" onmouseover = "location.href = '#anynameyoulike';">W3C</a>
    Just a refinement - that should be an identifier reference that's assigned to the location:

    Code:
    <a href="http://www.w3.org/" onmouseover = "location.href = '#anyidyoulike';">W3C</a>
    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
  •