分享

XML Ticker

 pengyan 2006-11-20


Description: This is an XML based JavaScript Ticker that can tick any number of messages. One of the beneifts of using XML is seperation of content from presentation- the contents for this ticker resides in a seperate file. This script currently works only in IE, degrading well with the rest.

Demo:


Directions Developer‘s view

Step 1: Insert the below into the <BODY> section of your page, where you wish the ticker to appear:

Select All

Step 2: Download the following xml file, and upload to your webpage directory. It contains the ticker style and contents:

ticker_items.xml (right click, and select "Save as")

You‘re essentially done! 

Understanding the structure of ticker_items.xml

All changes to the scroller appearance and contents are made inside the external .xml file. To edit this file, use any text editor to open it. Here is an explanation of the variables involved:

TICKER
tickerstyle
 ? pause = "true" / "false" :: "true" for pause onMouseOver
 ? timeout = any integer :: The delay in seconds between different messages.
 ? border = any integer :: Border width of Ticker
 ? bordercolor = #HexColor :: The border color of Ticker
 ? background = #HexColor :: Background color of Ticker
 ? width = any integer :: Ticker width
 ? height = any integer :: Ticker height
tickerlinkstyle
  mouseout
  ? font = "verdana,arial,helvetica....." :: Ticker link font
  ? color = #HexColor :: Ticker link color
  ? decoration = "none" / "underline" / "underline + overline" :: Ticker link style
  ? weight = "normal" / "bold" :: Ticker link weight
  ? size = ‘any integer‘pt :: Ticker link size
  mouseover
  ? font = "verdana,arial,helvetica....." :: Ticker link font
  ? color = #HexColor :: Ticker link color
  ? decoration = "none" / "underline" / "underline + overline" :: Ticker link style
  ? weight = "normal" / "bold" :: Ticker link weight
  ? size = ‘any integer‘pt :: Ticker link size
tickeritem
 ? URL = A valid URL :: Ticker link URL
 ? target = "_blank" / "_top" / "_self" / ‘any other valid target name‘ :: Ticker link target

Have fun!

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多