AngularJS Example:

by thenetfreaker

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<div ng-app>
  <div ng-controller="TodoCtrl">
      <div id="news_strip" ng-init="init()" ng-mouseover="conf.news_move_flag=false" ng-mouseout="conf.news_move_flag=true">
            <div class="shadow left">&nbsp;</div>
            <a ng-repeat="(k, n) in news track by $index" ng-style="{'right': get_news_right($index)}" id="news_{{$index}}" rel="nofollow" target="_blank" href="{{n.link}}">
                <span class="date">{{n.pubDate}}</span>
                <span class="title">{{n.title}}</span>
            </a>
            <div class="shadow right">&nbsp;</div>
        </div>
  </div>
</div>

CSS

#news_strip {
  width: 100%;
  border-bottom: 1px dotted #cccccc;
  display: block;
  height: 17px;
  position: relative;
  overflow: hidden;
}

#news_strip a {
  display: inline-block;
  text-decoration: none;
  margin-right: 20px;
  z-index: 1;
  position: absolute;
  top: 0px;
  width: 450px;
  vertical-align: top;
}

#news_strip a span {
  cursor: pointer;
  display: inline-block;
  color: #343434;
  font-weight: bold;
  padding-right: 5px;
  z-index: 1;
}

#news_strip a span.date {
  display: inline-block;
  font-weight: normal;
  color: #888888;
}

#news_strip a:hover span.title {
  text-decoration: underline;
}

/* The shadow DIVs of the sides are decorative and optional, but they add a very nice effect :) */

#news_strip div.shadow{
  position: absolute;
  top: 0px;
  width: 30px;
  height: 100%;
  z-index: 5;
  background: #ffffff;
}

#news_strip div.shadow.left{
  left: 0px;
  -webkit-box-shadow: 10px 0px 10px #fff;
  -moz-box-shadow: 10px 0px 10px #fff;
  box-shadow: 10px 0px 10px #fff;
}

#news_strip div.shadow.right{
  right: 0px;
  -webkit-box-shadow: -10px 0px 10px #fff;
  -moz-box-shadow: -10px 0px 10px #fff;
  box-shadow: -10px 0px 10px #fff;
}

JavaScript

function TodoCtrl($scope, /*$http,*/ $interval) {  
    $scope.news = [];
    $scope.conf = {
        news_length: false,
        news_pos: 200, // the starting position from the right in the news container
        news_margin: 20,
        news_move_flag: true
    };
    
    $scope.init = function() {
        /*$http.post('the_news_file.json', null).success(function(data) {
            if (data && data.length > 0) {*/
                $scope.news = data;
                $interval($scope.news_move ,50);
        /*  }
        });*/
    };
    
    $scope.get_news_right = function(idx) {
        var $right = $scope.conf.news_pos;
        for (var ri=0; ri < idx; ri++) {
            if (document.getElementById('news_'+ri)) {
                $right += $scope.conf.news_margin + angular.element(document.getElementById('news_'+ri))[0].offsetWidth;
            }
        }
        return $right+'px';
    };
    
    $scope.news_move = function() {
        if ($scope.conf.news_move_flag) {
            $scope.conf.news_pos--;
            if ( angular.element(document.getElementById('news_0'))[0].offsetLeft > angular.element(document.getElementById('news_strip'))[0].offsetWidth + $scope.conf.news_margin ) {
                var first_new = $scope.news[0];
                $scope.news.push(first_new);
                $scope.news.shift();
                $scope.conf.news_pos += angular.element(document.getElementById('news_0'))[0].offsetWidth + $scope.conf.news_margin;
            }
        }
    };
}

var data = [{"title":"\u05d4\u05d0\u05ea\u05d2\u05e8 \u05d4\u05d1\u05d0: \u05db\u05da \u05ea\u05e8\u05d5\u05e1\u05e7 \u05d4\u05db\u05dc\u05db\u05dc\u05d4 \u05d4\u05e2\u05e0\u05e4\u05d4 \u05e9\u05dc \u05d3\u05d0\u05e2\u05e9","link":"http:\/\/news.walla.co.il\/?w=\/\/2790612","pubDate":"00:10"},{"title":"\u05d1\u05e9\u05dc \u05d4\u05db\u05e8\u05ea \u05de\u05de\u05e9\u05dc\u05ea \u05e9\u05d1\u05d3\u05d9\u05d4 \u05d1\u05e4\u05dc\u05e1\u05d8\u05d9\u05df:...