Jump to content

Recommended Posts

Hello,

 

here is the script I used from this site

http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm

 

the problem with this one it did not fit in my design, I need the scroll fixed and only take action when I point to the far left or right image

 

any idea ?

 

thanks

 

I have redone that thing using mootools. It gives cleaner codes and is easier to modify

 

what's needed in your head section

<script src="mootools.v1.11.js"></script>
<style>


#mousemove{
width: 500px;
height: 358px;
border: 1px solid #000;
overflow-x: hidden;
overflow-y: hidden;
margin: 0 auto;
}



.inside {
width: 2450px;
height: 358px;
}


.scroll_image{
padding-left:0px;
margin-left:0px;
margin-right:0px;
padding-right:0px;
border:0px;

float:left;
height: 358px;
width: 400px;
}

</style>

the slider itself

<div id="mousemove">
<div class="inside">
	<img class="scroll_image" src="http://www.onlinecooking.net/news/NewsImages/chicken.JPG" />
	<img class="scroll_image" src="http://www.onlinecooking.net/news/NewsImages/chicken.JPG" />
	<img class="scroll_image" src="http://www.onlinecooking.net/news/NewsImages/chicken.JPG" />
	<img class="scroll_image" src="http://www.onlinecooking.net/news/NewsImages/chicken.JPG" />
	<img class="scroll_image" src="http://www.onlinecooking.net/news/NewsImages/chicken.JPG" />
	<img class="scroll_image" src="http://www.onlinecooking.net/news/NewsImages/chicken.JPG" />
</div>
</div>
<script>

var scroll1 = new Scroller('mousemove', {area: 100, velocity: 1});

// Mousemove
$('mousemove').addEvent('mouseenter', scroll1.start.bind(scroll1));
$('mousemove').addEvent('mouseleave', scroll1.stop.bind(scroll1));
</script>

Mootools is a javascript framework that makes javascripting a hell lot easier and especially when it's about graphical user interfaces. It's similar to prototype but better. check out the website and check the demos and the documentation about mootools to learn more http://mootools.net/

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.