Solved

How to move an object from left to center?

Posted on 2007-11-30
7
146 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 250 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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 250 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now