Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to move an object from left to center?

Posted on 2007-11-30
7
Medium Priority
?
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…

730 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