Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to move an object from left to center?

Posted on 2007-11-30
7
Medium Priority
?
154 Views
Last Modified: 2013-11-05
I know almost nothing about javascript, so please bear with me... I have an object (picture) that I want to have move from the left side of the web page to the center.  I can't imagine this hasn't been done before; is there a "canned" javascript that would do this for me? (hopefully with instructions, like a tutorial)?

I appreciate the help.
0
Comment
Question by:rmmarsh
  • 3
  • 2
  • 2
7 Comments
 
LVL 7

Expert Comment

by:bdichiara
ID: 20384405
Are you wanting it to animate, or simply move from the left to the center in 1 quick step?
0
 

Author Comment

by:rmmarsh
ID: 20384423
kind of like "amble" across the page (not slow, but now fast either)... what I have is a jpg that I want to have move from left to the center of the page where it is now... just wanted to spiffy up the site a bit... :D
0
 
LVL 7

Accepted Solution

by:
bdichiara earned 1000 total points
ID: 20385636
I would check out some of the pre-built packages like Scriptaculous and Mootools. With the help of some javascript that detects the width of the browser window, you should be able to find the center of the screen and execute a MOVE or SLIDE with one of those scripts. It may even have a built-in center option. Check out the documentation.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rmmarsh
ID: 20385669
I have looked at Scriptaculous, and it looks like it would do what I want... however, getting it integrated with D.H.E. (Dynamic HTML Editor) is where the problem is.  I don't know where to start, where to put what, and that obviously is the problem.  I'm reading a Javascript textbook now to get up to speed, but would like to get this done before the New Year! :D

Do you know D.H.E.?
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 20388071
I am not familiar with DHE, but if it is just another Javascript package, you can include both in your <head> section just by including the right <script> tags. Libraries are usually built well enough so that conflicts can be avoided.
0
 

Author Comment

by:rmmarsh
ID: 20388085
No, it's a HTML editor (pretty cool, at that!)... so everything goes in the HEAD section?
0
 
LVL 36

Assisted Solution

by:Zyloch
Zyloch earned 1000 total points
ID: 20388089
Yes, you almost always want to include external Javascript in the <head> section. I am more familiar with jQuery than Scriptaculous, but you should be able to find demos on their pages that show you how to use it. All of the popular Javascript libraries today come with very nice animations.

Please let us know if you encounter any problems, and we'll try to help you further.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question