1

This is the code:

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> 
<script src="http://newsxpressmedia.com/files/theme/jquery.newsTicker.js"></script>
<script>$(function() {
    var file = "http://newsxpressmedia.com/files/theme/test.txt";
    $.get(file, function (txt) {
        //var lines = txt.responseText.split("\n");
        var lines = txt.split("\n");
        $ul = $('<ul class="newsticker" />');
        for (var i = 0, len = lines.length; i < len; i++) {
            //save(lines[i]); // not sure what this does
            $ul.append('<li>' + lines[i] + '</li>');
        }
        //$ul.appendTo('body').newsTicker({
        $ul.appendTo('div.wcustomhtml').newsTicker({
            row_height: 48,
            max_rows: 2,
            speed: 6000,
            direction: 'up',
            duration: 1000,
            autostart: 1,
            pauseOnHover: 1
        });
    });
});

    autostart: 1,
    pauseOnHover: 0
});
</script>

The links exist and not give 404 not found. But i don't see the lines from the text file being reading.

I clicked on my site Ctrl+Shist+C in the Audits tab i see one error:

Unexpected token: test.html:120 i click on it and there is one empty line thats it. And i'm not using and dont have any file called test.html

The goal is that the jquery will read each time one or two lines and scroll it up.

This is the site:

http://newsxpressmedia.com/test.html

0

2 Answers 2

1

Your javascript code is malformed. Remove this from your javascript:

    autostart: 1,
    pauseOnHover: 0
});
Sign up to request clarification or add additional context in comments.

2 Comments

@Marty Word crap is not allowed to mention? Even if it's crap? :)
Not sure to be honest :S
1

You should remove this obsolete code from the end of your function:

});

autostart: 1,
pauseOnHover: 0

See jsfiddle

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.