SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    0 Post(s)
    0 Thread(s)

    Help me to convert news ticker to RSS News Ticker

    I have a simple news ticker script that taking scrolling text, but i want that it should take contents from rss feed.

    Here is the code
    HTML Code:
    <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src=""></script>
    <link rel="stylesheet" href="li-scroller.css" type="text/css" media="screen" /> 
    <script type="text/javascript">
        $("ul#ticker02").liScroll({travelocity: 0.15});
                    <ul id="ticker01">
                                <li><span>10/10/2007</span><a href="#/ogt/content/news/News183.complete">The first thing that most Javascript programmers</a></li>
                                <li><span>10/10/2007</span><a href="#/ogt/content/news/News175.complete">End up doing is adding some code</a></li>
                                <li><span>10/10/2007</span><a href="#/ogt/content/news/News177.complete">The code that you want to run</a></li>
    Anyone can help me in converting simple ticker too rss ticker?

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    North-East, UK.
    3 Post(s)
    0 Thread(s)
    Sorry, I'm no JavaScript guy, but try this.
    Code HTML4Strict:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src=""></script>
        <script type="text/javascript" src=""></script>
        <link rel="stylesheet" type="text/css" href="" />
        <link rel="stylesheet" type="text/css" href="" />
        <link rel="stylesheet" type="text/css" href="" />
          YQL/XML Demo
        <ul id="feed"></ul>
        <script type="text/javascript" charset="utf-8">
            $.getJSON("*%20from%20xml%20where%20url%3D''&format=json&callback=?", function(yql){
              if(undefined !== yql.query.error){
                console.log('YQL Error: ' + yql.query.error);
                $('ul#feed').append('<li>' + this.title + '</li>');

    It uses YQL to obtain the XML feed for this SitePoint forum in JSON.
    @AnthonySterling: I'm a PHP developer, a consultant for and the organiser of @phpne, a PHP User Group covering the North-East of England.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts