Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-16-2008, 09:39 PM   PM User | #1
OutdoorsBlogger
New to the CF scene

 
Join Date: Sep 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
OutdoorsBlogger is an unknown quantity at this point
jquery/other method to scroll content?

I have a div holding a tag cloud that is a set height/width. If there are too many items I'm left with either clipping the content or pushing the div's height.

Are they any good jquery plugins or other methods to add up/down scrolling if the content is too long?

Thanks so much in advance.
OutdoorsBlogger is offline   Reply With Quote
Old 10-17-2008, 12:07 AM   PM User | #2
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
set the div's style.overflow = "auto" to auto add scrollbars if content is too big.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote
Old 10-17-2008, 01:43 AM   PM User | #3
OutdoorsBlogger
New to the CF scene

 
Join Date: Sep 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
OutdoorsBlogger is an unknown quantity at this point
Quote:
Originally Posted by rnd me View Post
set the div's style.overflow = "auto" to auto add scrollbars if content is too big.
Yes, this is very true. I guess what I'm wondering is if there is anything that accomplishes the same function as a css scrollbar, but in a cleaner way? I'd love to see something with an image/button to scroll the visible area of the div up and down.

Also, I've checked out some pagination scripts, but they all seem to work off of the child elements instead of filling the height and putting the next chunk of content on the next page.

Thanks for the heads up, and sorry for not being a little more specific.

Cheers.
OutdoorsBlogger is offline   Reply With Quote
Old 10-17-2008, 03:21 AM   PM User | #4
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
ok.
here's a simple example of buttons:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type='text/css'>
	#limit { position: relative; height: 100px; width: 200px; overflow: hidden;  }
	
</style>
</head>

<body onload="boot()">
<input type='button'  value='down' onclick="div.scrollTop+=30;"  />	
<input type='button'  value='up' onclick="div.scrollTop-=30;"  />	
<div id='limit'>
<p>

<font size="2" color="#004040" face="comic sans ms, verdana, arial">• <a href="http://www.srh.noaa.gov/srh/jetstream/lightning/flashriprock.htm"><b>
Flash Riprock and the Bolt from the Blue </b></a> This is a lightning safety poster in pdf
format that can be downloaded.  It also lists lightning myths that need to be dispelled.  
<br>
<font size="1"> www.srh.noaa.gov/srh/jetstream/lightning/flashriprock.htm</font></font></p><p>


<font size="2" color="#004040" face="comic sans ms, verdana, arial">• <a href="http://www.srh.noaa.gov/srh/jetstream/mesoscale/1000trains.htm"><b>
Night of a Thousand Trains</b></a> This is a tornado safety poster in pdf format that
can be downloaded.  It also lists tornado myths that need to be dispelled.   
<br>
<font size="1"> www.srh.noaa.gov/srh/jetstream/mesoscale/1000trains.htmh</font></font></p><p>

<font size="2" color="#004040" face="comic sans ms, verdana, arial">• <a href="http://www.spc.noaa.gov/faq/tornado/#About"><b>
Frequently Asked Questions About Tornadoes</b></a> This is a tornado site that gives you all 
the information.  This list of FAQ's has been compiled from the public's questions.  
  
<br>
<font size="1"> www.spc.noaa.gov/faq/tornado/#About</font></font></p><p>

<font size="2" color="#004040" face="comic sans ms, verdana, arial">• <a href="http://www.noaa.gov/stormwatch/"><b>
NOAA's Storm Watch </b></a> This is a roundup of NOAA weather Web sites. 
You'll find links to the latest weather forecasts around the USA and even 
around the world. Track storms through NOAA weather satellites, get the 
latest weather maps and learn how to protect yourself and your community 
from severe weather. <br>
<font size="1"> www.noaa.gov/stormwatch</font></font></p>

</div>	

<script type='text/javascript'>
	function el(tid) {return document.getElementById(tid);}
	var div = el("limit");
</script>


</body>
</html>
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:50 AM.


Advertisement
Log in to turn off these ads.