473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

sliding bar problem

Hello,

I started to rewrite the lightbox code for a different layout. The main
advantage would be to have a sliding image bar, but I can not get the
sliding motion.

The html code:
<div id="slidebar">
<div id="images-wrapper">
<div id="images">
<a href="img.jpg" title="No title" rel="showcase"><img
src="img.jpg" /></a>
<a href="img.jpg" title="No title" rel="showcase"><img
src="img.jpg" /></a>
<a href="img.jpg" title="No title" rel="showcase"><img
src="img.jpg" /></a>
</div>
</div>
</div>

With the script I change the layout of #images to have only one row,
add the navigation arrows and on onmouseover effect for these arrows:

slidebar = $('slidebar');
Element.hide('slidebar'); // To prevent flickering

Element.setWidth('images',10000);
images = $('images-wrapper');
images.style.overflow = 'hidden';

/*********************************************
Here comes the main part
*********************************************/

var prevArrow = document.createElement('img');
prevArrow.setAttribute('id','prevArrow');
prevArrow.src = prevImage;
prevArrow.className = 'showcaseArrow';
prevArrow.onmouseover =function(){ new Effect.moveBy('images',0,20);
};
slidebar.appendChild(prevArrow);

var nextArrow = document.createElement('img');
nextArrow.setAttribute('id','nextArrow');
nextArrow.src = nextImage;
nextArrow.className = 'showcaseArrow';
nextArrow.onmouseover = function() { new
Effect.moveBy('images',0,-20)};
slidebar.appendChild(nextArrow);

Element.show('slidebar');

If I try this code, then I get an error for the onmouseover:
Effect.moveBy is not a constructor

Any ideas?

You can see this script in work at
http://www.rajk.uni-corvinus.hu/~nag...index/koltozes

Thx, Viktor

Apr 22 '06 #1
1 2775
ASM
Viktor a écrit :
Hello,

I started to rewrite the lightbox code for a different layout. The main
advantage would be to have a sliding image bar, but I can not get the
sliding motion.


have a look here:
http://ygda.free.fr/hscroll2.htm
http://ygda.free.fr/hscroll3.htm
if explain needed -> in french here :
http://ygda.free.fr/hscrollScript.htm

--
Stephane Moriaux et son [moins] vieux Mac
Apr 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Developwebsites | last post by:
Hi all, I've made a sliding puzzle game in shockwave which works just fine, except I dont know how to have it solve itself. the URL is: http://members.aol.com/rglukov/games/selfsolve.htm ...
8
by: Jakej | last post by:
I've been using a javascript in an html file for a banner slider, and it works as desired. But I'd like to use it on more than one page and it would be great if I could transfer the code to a .js...
2
by: Mohammad Parwez | last post by:
Hi, Can any one help me creating a control, which slides on any particular event. The scenario is something like this: - I have a form, which loads a user control. On load of the form this...
1
by: Guadala Harry | last post by:
AFAIK, when placing an object into the Cache with no special instructions (no dependencies, sliding expirations, hard expirations, etc), it will just sit there in the Cache until the system decides...
2
by: Lonewolf | last post by:
Hi, does anyone know of a way to do sliding window similar to WMP 9's slider bar which can slide up when the mouse gets to the bottom of the screen in fullscreen mode during playback. Basically...
1
by: archana | last post by:
Hi all, can anyone tell me difference between absolute expiration and sliding expiration. thanks in advance.
12
by: rhino | last post by:
I'm having some problems with Sliding Doors, as described in an article in A List Apart (http://www.alistapart.com/articles/slidingdoors/) and as detailed in the CSS Tab Designer v2.0 program. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.