javascript - How do i use the code that read the text file that was working with the code that scroll the text in the red box? -


I want tht at the end every time it reads from the text file when two lines display them and red in color Scrolls Box Latest News This is what I tried to do:

  & lt; Script type = 'text / javascript' src = "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1 /jquery.min.js"></script> & Lt; Script type = 'text / javascript' src = "http://vaakash.github.io/jquery/easy-ticker.js" & gt; & Lt; / Script & gt; & Lt; Style & gt; .demof {border: 1px solid # ccc; Margin: 25px 0; } .demof ul {padding: 0; List style: none; } .demof li {padding: 20px; Border bottom: 1px dashed #ccc; } .demof li.odd {background: #fafafa; } .demof li: after {content: ''; Display area; Clean both; } .demof img {float: left; Width: 100px; Margin: 5px 15px 0 0; }. {Font-family: arial, sans-serif; Font-size: 20px; font-weight: bold; Color: # 06f; } .demof p {margin: 15px 0 0; Font-size: 14px; } .demo3 {font-family: Arial, sans-serif; Border: 1 px solid # c20; Margin: 50px 0; Font style: italic; Status: Relative; Padding: 0 0 110 px; Box-Shadow: 0 2px 5px -3px # 000; Boundary-radius: 3px; } .demo3: first {content: "latest news"; Display: Inline-block; Font style: normal; Background: # C20; Padding: 10px; Color: #fff; font-weight: bold; Status: Completed; Top: 0; Left: 0; } .demo3: after {content: ''; Display area; Top: 0; Left: 80px; Background: Linear-shield (#FFF, RGBA (255, 255, 255, 0)); Height: 20px; } .demo3 ul li {list-style: none; Padding: 10 px 0; } & Lt; / Style & gt; & Lt; Script & gt; Var number = 300; Var counter = set interval (timer, 1000); // 1000 will run every 1 second function timer () {count = count - 1; If (calculation == -1) {clear interval (counter); Return; } Var seconds = Count% 60; Var minute = Math. Floor (count / 60); Var hours = Math.flur (min / 60); Min% = 60; Hours% = 60; Document.getElementById ("Timer"). InnerHTML = hours + "hours" + minutes + "minutes and" + seconds + "seconds left until next news update."; // clock for spelling} function news () {$ ('body'). ('. Newsticker'). Remove (); // This will clear current data if its current var file = "http: // newsxpressmedia com / files / topic / test.txt"; $ .get (file, function (txt) {// var line = txt.responseText.split ("\ n"); var line = txt.split ("\ n"); $ ul = $ ('& lt; Ul class = "demo3" /> for;); (var i = 0, len = lines.length; i & lt; len; i ++) {// save (line [i]); // Not sure that this $ $ Ul.append (' [i] +'  '); // here} // $ ul.appendTo (' Body ') newsTicker ($ ($) () () () () () () () () ($ (function) {News (); Set interval (function () {news}} }, 30000) // This will call every 1 minute you can change it})  


relationship This is that I see all the text from the text file in the red box, scroll through the latest news and this docent.

It was only in one line:

>

  $ ul = $ (' "demo3" />);   

You have the name plugin wrong - this is easy Has no timer, Tick ticker change $ ul.appendTo ('div.wcustomhtml'). News timer ({ $ ul.appendTo ('div.wcustomhtml'). EasyTicker ({ and see if it works


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -