Sliding content.

martynball

New Member
Messages
60
Reaction score
0
Points
0
I am trying to find a way to make a div slide out into the page, slowly. Not just appear. I was think of something like this:

Code:
<script type="application/javascript">
var xmlhttp;

function divBigger(id)
  document.getElementById("moveDiv").style.left="8%";
 </script>

Then add a php condition to say ++1 (on the left:;) until ==20%. But I don't know how, and I don't know how to make a variable to get the value of left:;. Is there another way.

I want to enhance that with by making a scrolling div scroll when I put my mouse to the sides... I don't know where to start with any of this :(.

Sort of like this: http://www.gapmedics.co.uk/

Scroll over the word NAMIBIA and the others on that line.

-----

Also, to know how this is done would be nice:
http://bestwebgallery.com/page/3/

When you mouseover a image it goes darker and a tool tip is displayed, I want to know how its made to go darker.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
Can PHP do it?

no.
PHP is run server-side (ASP too)
so once the page gets to the user's browser PHP has no longer control over it.
this is where javascript (run client-side) comes into play, it has full control (as long as the client allows it) over the webpage

now there are ways for PHP to be executed once the page has been requested (AJAX)
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
lol. that link is to a page with jQuery not mooTools.

but I prefer to work with javascript using jQuery, so you might want to try it out too.
its really just based on what you're comfortable with.

Sorry for typing wrong. It is jquery

Actually after checking that I was also checking the mootools And I saw similar type action so When posting here confused. But I like th mootools too

check here --> http://mootools.net/

:)
 
Last edited:
Top