
Internet.com - The Network for Technology Professionals

    * > IT
          o internet.com/IT
          o internet.com/CIO
          o internet.com/Security
          o internet.com/Networking
          o internet.com/Storage
          o CIO Update
          o Database Journal
          o Datamation
          o Enterprise IT Planet
          o Enterprise Networking Planet
          o Enterprise Storage Forum
          o eSecurity Planet
          o Hardware Central
          o Intranet Journal
          o ISP Planet
          o ITSMwatch
          o IT Channel Planet
          o Linux Planet
          o ServerWatch
          o VoIP Planet
          o Wi-Fi Planet
          o WinDrivers.com
          o Network Map
    * > Developer
          o internet.com/Developer
          o 15 Seconds
          o 4GuysFromRolla.com
          o ASP101
          o CodeGuru
          o Developer.com
          o DevX
          o FlashKit.com
          o Gamelan
          o JARS
          o JavaScript.com
          o JavaScriptSource
          o PHPBuilder.com
          o ScriptSearch
          o SharePoint Briefing
          o VB Forums
          o VB Wire
          o Web3Beat
          o WebDeveloper.com
          o Webreference
          o Network Map
    * > News
          o Internetnews.com
          o Linux Today
          o Network Map
    * > Small Business
          o Ecommerce Guide
          o SmallBusinessComputing
          o Webopedia
          o WinPlanet
          o Network Map
    * > Personal Tech
          o BlackBerryToday
          o iPhoneGuide
          o Jumbo
          o Megapixel.net
          o Palm Boulevard
          o PDAStreet
          o PocketPCWire
          o SharkyExtreme
          o Smart Phone Today
          o The List: ISPs
          o Wi-FiHotSpotList
          o WindowsMobileToday
          o Network Map

    * > Events
          o JupiterEvents
          o internet.com/webcasts
    * Blogs
    * Jobs
    * Partners
    * > Solutions
          o eBooks
          o HotList
          o Video
    * Shop

    * > Login
          o Manage My Profile
    * >Register
          o Why Join?


www.webdeveloper.com
Recent Articles
# Using Oracle's V$OSSTAT to peek at Your Operating System
# Linked Data Movement Gains Momentum
# Create a Twitter Mood Graph With Ruby
# Restoring an SSAS database using Windows PowerShell and SQL Server 2008 AMO
# The JavaScript Chronicles - Data Types
# Cloud Computing with Amazon Simple DB
# Using Dojo for Client-Side Validation
# Simple Pie Chart for Analysis Services Data
# How to Upload Images Using PHP
# SQL Server Re-indexing Tips
	 

Go Back 	  	WebDeveloper.com > Client-Side Development > JavaScript
Reload this Page on mouse over: scroll text
	
User Name 		Remember Me?
Password 		
Register 	FAQ 	Members List 	Calendar 	Today's Posts 	Search

Search Forums
Show Threads   Show Posts
Tag Search
Advanced Search
Go to Page...
Reply
 
	Thread Tools 	Search this Thread 	Rate Thread 	Display Modes
  #1  
Old Yesterday, 03:02 PM
marringi marringi is offline
Registered User
	  	
Join Date: Apr 2008
Posts: 57
on mouse over: scroll text
Hello,

I'm hoping to get a code that works something like this:

I would like to have two arrows on the left and right on the side of a box (no border on the box) and when the mouse is put over the arrows, the text between the two arrows (in the box) moves in the direction of the arrows. Between the two arrows (the scrolling text) I'd have links. With this I can have many links at a small place on the page.

If been trying to find this kind of a script on the web with no luck.

Any ideas?
Reply With Quote
marringi
View Public Profile
Find all posts by marringi
  #2  
Old Yesterday, 04:13 PM
voidvector voidvector is offline
Registered User
	  	
Join Date: Oct 2008
Posts: 333
I hacked this together in 5 minutes, the code is not terribly kosher. The doctype is important for it to work on IE.

HTML Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript">
var UpdateInterval = 1;
var PixelPerInterval = 10;
var scorllerInterval;

function start_scroll_left()
{
	scorllerInterval = setInterval(scroll_left, UpdateInterval);
}

function scroll_left()
{
	document.getElementById('scroller').scrollLeft -= PixelPerInterval;
} 

function start_scroll_right()
{
	scorllerInterval = setInterval(scroll_right, UpdateInterval);
}

function scroll_right()
{
	document.getElementById('scroller').scrollLeft += PixelPerInterval;
}

function stop_scrolling()
{
	clearInterval(scorllerInterval);
}
</script>

<p><span id="left" onmouseover="start_scroll_left()" onmouseout="stop_scrolling();">left</span> 
<span id="right" onmouseover="start_scroll_right()" onmouseout="stop_scrolling();">right</span></p>

<div id="scroller" style="overflow: hidden; white-space: nowrap;">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div>

Reply With Quote
voidvector
View Public Profile
Find all posts by voidvector
  #3  
Old Yesterday, 05:09 PM
marringi marringi is offline
Registered User
	  	
Join Date: Apr 2008
Posts: 57
That's what I ment, thanks!

But is it possible to control the speed of the scrolling?
Reply With Quote
marringi
View Public Profile
Find all posts by marringi
  #4  
Old Yesterday, 05:59 PM
voidvector voidvector is offline
Registered User
	  	
Join Date: Oct 2008
Posts: 333
change the values of "UpdateInterval" and "PixelPerInterval"
Reply With Quote
voidvector
View Public Profile
Find all posts by voidvector
Reply

Bookmarks

    * Submit Thread to Digg Digg
    * Submit Thread to del.icio.us del.icio.us
    * Submit Thread to StumbleUpon StumbleUpon
    * Submit Thread to Google Google 


Tags
mouseover, scrolling

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Resolve Mark Thread Resolved
Display Modes
Linear Mode Linear Mode
Hybrid Mode Switch to Hybrid Mode
Threaded Mode Switch to Threaded Mode
Search this Thread

Advanced Search
Rate This Thread
ExcellentExcellent
GoodGood
AverageAverage
BadBad
TerribleTerrible
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
	
Forum Jump
User Control PanelPrivate MessagesSubscriptionsWho's OnlineSearch ForumsForums Home Client-Side Development    HTML    XML    CSS    Graphics    JavaScript    Multimedia    Web Video    Accessibility    Dreamweaver/Expression Web    General Server-Side Development    PHP    Perl    .NET    Java (NOT JavaScript!)    ASP    SQL    Other Site Management    Domain Names    Forum, Blog, Wiki & CMS    Search Engines    Server Management    Business Matters    Website Reviews Etc.    The Coffee Lounge    Forum Feedback    Computer Issues


All times are GMT -5. The time now is 05:52 AM.

Contact Us - Web Developer Forum - Archive - Top


Acceptable Use Policy

JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2009 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

