473,487 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2780
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
6079
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
4647
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
2467
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
2841
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
4746
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
1878
by: archana | last post by:
Hi all, can anyone tell me difference between absolute expiration and sliding expiration. thanks in advance.
12
1905
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
7106
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
6967
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
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.