views:

73

answers:

2

Hey guys,

I've got a little script that fetches my latest tweets... I use JQuery's getJSON method to fetch my tweets. The script works well with Chrome and Safari but when it comes to Firefox, nothing appears!

here's the code:

$.getJSON('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=lpdahito&count=3&callback=?', function(data) {
    $('#tweets').html('<p>' + data[0].text + '</p><p>' + data[1].text + '</p><p>' + data[2].text + '</p>');
});

Thanks for helping!

LP

+1  A: 
Neewok
Thx for answering...When you say nothing's wrong, did you see the tweets appear?I get the JSON object in FF, it just won't show in my html...Whereas with Chrome or Safari, it'll show.
lpdahito
Yep, it appeared. I'm sorry I can't help you more, you should give more details.
Neewok
A: 

Never mind guys... I had forgotten to tell firefox when to call the script...

I added:

$(document).ready(function(){
  //my code here
});

Everything is fine now...

Thx for helping!

LP

lpdahito