Twitter ticker.. how easy?

Soldato
Joined
20 Oct 2002
Posts
18,517
Location
London
So on the site I've built I've got a really simple jQuery ticker for their news items, nothing special. They've asked if I could make it updateable from a Twitter source or something. I've looked at implementing RSS feeds etc but it's going a bit over my head. I've already spent far too much time doing 'extras' on this website and they did say if it was too hard then not to bother. So I am that way inclined..

At the moment the ticker is simply this, animated via jQuery:

Code:
<ul id="ticker01">
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li> 
</ul>

Basically is there anything out there that might do this for me without too much work? :p Thanks!
 
I've used this before and it worked great.

Code:
<div id="twitter_div">
  <ul id="twitter_update_list">
    <li><script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script></li>
    <li><script type="text/javascript" src="http://twitter.com/statuses/user_timeline/[B][U]TwitterFeed[/U][/B].json?callback=twitterCallback2&amp;count=5"></script></li>
  </ul>
</div>

Just replace "TwitterFeed" with the feed you want to use.
 
Last edited:
That's brilliant. Even works with the ticker I had already setup :cool:

However in IE it seems to kill any of my content below it. I get this error:

Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

And my footer etc doesn't show. FF is fine :confused:

Is there any basic instructions for it? I can't seem to find anything on the twitter site.

EDIT: Testing it here: link removed
 
Last edited:
Hmn I tried both things suggested in that link and neither worked.

The page is here: link removed

There should be nice rounded corners and a footer at the bottom!
 
Last edited:
I get no error when loading up the page in IE8, only problem is the bottom rounded corners. They don't work in IE8 but work fine in Firefox.

EDIT: Just refreshed the page in IE8 and now the rounded corners work? Gotta love IE8, it's so random.
 
Last edited:
I know its totally random! Just won't work for me in IE at all. The page should end like this link removed (that's not the Twitter ticker)

Can't mess around with it now because I'm on a train but I have only just installed IE8 and even reset it to defaults, so it can't be a user specific problem. Definitely IE being dumb. Argh! Anyone else got any ideas? :)
 
Last edited:
Your problem is that you're modifying an element before it has been closed. Thats a big no-no in Internet Explorer

Code:
<div id="twitter_div">
<ul id="twitter_update_list">
</ul>
</div>

<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/TwitterFeed.json?callback=twitterCallback2&amp;count=5"></script>

If you make your code look like that it should work.
 
That's brilliant, thanks very much
icon14.gif
 
Back
Top Bottom