jumpy images help needed

This is a discussion on "jumpy images help needed" within the JavaScript Forum section. This forum, and the thread "jumpy images help needed are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 14th, 2007, 02:47
New Member
Join Date: Sep 2007
Location: In doors
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
jumpy images help needed

Hi. I'm trying to take an image and make it do a jump on the onMouseOver call. I have got some code, but I am not sure whether it is the right direction.
Code: Select all
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Barbara Shannon Consulting</title>
    
<script language="JavaScript">

Hmove=200;
function imageJump(objID)
{
    var obj=document.getElementById(objID);
    Hmove-=2;
    obj.style.left=Hmove;
    
    if(Hmove>100)
        window.setTimeout("imageJump('" +obj.id+ "');", 0);
}

</script>

</head>

<link href="style/style.css" rel="stylesheet" type="text/css"/>

<body>    
<div id="wrapper">
    <div id="container">
          <div id="topBar">
        
            <a href="#" onMouseOver="imageJump('JS')">
            <img src="http://www.webforumz.com/images/about.png" name="JS" hspace=0 border=0 align=baseline id=JS style="z-index: 0; left: 400px; position: absolute; top: 50px">
            </a>
            
        </div>
    </div>
</div>

Last edited by karinne; Sep 14th, 2007 at 15:34. Reason: Please use the vBcode [ code ] when inserting code in your post.
Reply With Quote

  #2 (permalink)  
Old Sep 14th, 2007, 15:33
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: jumpy images help needed

So by looking at your code and assuming that the links current "Left" position is zero, this code will make the image jump 200 pixels to the right and settle at 100 pixels to the right from its original position.

You would also have to specify the measurement you're using too

eg.

obj.style.left = Hmove + 'px';

Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
jumpy page pallworthy Web Page Design 3 Jun 2nd, 2008 09:12
multiple rollover images change multiple images joshlindem Web Page Design 4 Apr 18th, 2008 09:11
Designers needed, cloners needed. TargeTemplate Job Opportunities 0 Dec 27th, 2007 03:41
Help Needed urgently! Getting rid of border on linked images SkyeGospel Starting Out 6 Aug 6th, 2007 20:32
Images and SEO spinal007 Search Engine Optimization (SEO) 9 May 5th, 2007 15:57


All times are GMT. The time now is 10:35.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43