Chủ Nhật, 22 tháng 5, 2016

The unique scroller scrolls text at the very top of the page

This amazing scroller scrolls text towards the top of the page, rendering it hard to ignore. It's useful to broadcast important messages to your visitors
The amount of times the textual content is scrolled throughout the webpage is customizable (ie: 2 times than disappear), with the scroller slowing down when the mouse movements in the message.





==================================================
<marquee id="alertit" style="position:absolute;left:0px;top:0;background-color:#FFFFE6" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=speed"></marquee>

<script type="text/javascript">

/*
Alert-It Scroller script- By JavaScript Kit
For this and over 400+ free scripts, visit http://www.javascriptkit.com
This notice must stay intact
*/

//Customize your message here. Use any HTML desired:
var themsg='<span style="font:italic 22px Arial;color:red;"><b>Breaking News: Microsoft Stock up 10 points! Source: <a href="http://cnn.com" target="_new">CNN</a></b></span>'
var speed=6 //speed of scroller (1-10 or more)
var loops=2 //specify number of times message scrolls across screen (an integer or "infinite")

function populatescroller(){
var windowwidth=iecompattest().clientWidth
document.getElementById("alertit").innerHTML=themsg
document.getElementById("alertit").style.width=windowwidth
document.getElementById("alertit").scrollAmount=speed
document.getElementById("alertit").scrollDelay=20
document.getElementById("alertit").loop=loops
document.getElementById("alertit").onfinish=function(){
document.getElementById("alertit").style.visibility="hidden"
}
}

function iecompattest(){
return (document.compatMode!="BackCompat")? document.documentElement : document.body
}

if (document.all && document.getElementById){
window.onload=populatescroller
window.onresize=populatescroller
}

</script>

<p align="left">This free script provided by<br />
<a href="http://javascriptkit.com">JavaScript Kit</a></p>
==============================================
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 nhận xét

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© 2011 Best Web Hosting
Designed by Nang luong mat troi
Posts RSSComments RSS
Back to top