angular——话题精选(动态更换显示一条)
<!-------------------- 话题精选 -----------------------> <section class="white_bg topics "> <header class="fix_container "> <div class="fix_top_left" id="topics_mark"><i class="icon-topic"></i></div> <ul id="topic_title" > <li ng-repeat="topic in data.topics" class="font_16_14 black_title one_line_text" ng-click="action.toPage('tab.home-recommend-topic-detail')"> #{{topic}}# </li> </ul> <button class="btn blue_text_btn fix_top_right" ng-click="">更多</button> </header> </section>
// 话题更新 $scope.data.topics = [ "为什么政府突然不让你买房了啊啊啊啊啊", "A股趋势何去何从", "谁才是中国股市最大赢家" ]; function NewsTickerAutoPlay() { $("#topic_title li:first-child").remove().appendTo("#topic_title"); } setInterval(function () { NewsTickerAutoPlay() }, 5000);