Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8982499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:35:38+00:00 2026-06-15T20:35:38+00:00

This is my first post, I’m not a programmer, just someone that cobbles together

  • 0

This is my first post, I’m not a programmer, just someone that cobbles together code from all over the web every once in a while for projects I’m working on.

I’m trying to implement a scrolling Twitter marquee on a website I’m working on, but am running into a “Uncaught Reference Error: Jquery not defined” error.

I assumed this was because Jquery was not being included correctly or the include was failing. I’ve tried the following:

  1. Including the Jquery from different URLs, as well as hosting it locally
  2. Changing the sequence of include statements in my so that Jquery comes first

I found some similar threads on SO, but none of them help solve this.

Here’s my code:

<head>
<meta charset="UTF-8" />
<title>UnBox 2013 : Venues</title>
<link rel="stylesheet" type="text/css" media="all" href="/Volumes/Boot/Users/siddharthnair/Dropbox/UnBox 2013 Build/resonate/style.css" />
<link href='http://fonts.googleapis.com/css?family=Lekton:400,400italic,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,600,400italic,700' rel='stylesheet' type='text/css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'/> 
<script src='/Volumes/Boot/Users/siddharthnair/Dropbox/UnBox 2013 Build/resonate/jquery.marquee.js'/> 


<script type='text/javascript'>

var Tweetstream = {
init: function () {
this.insertLatestTweets('unboxfestival');
}, 
insertLatestTweets: function (username) {
 var limit = 5; // How many feeds do you want?
 var url = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' + username + '&count=' + limit + '&callback=?'; 

 $.getJSON(url, function (data) {
  var html = '<marquee behavior="scroll" scrollamount="1" direction="left">';

  for (var i in data) {
   html += '<a href="http://twitter.com/' + username + '#status_' + data[i].id_str + '">' + data[i].text + ' <i>' + Twitter.daysAgo(data[i].created_at) + '</i></a>';
  }

  html += '</marquee>';

  $('.tweetstream p').replaceWith(html);

  Twitter.fancyMarquee();
 });
}, 

fancyMarquee: function () {
 $('.tweetstream marquee').marquee('pointer')
  .mouseover(function () {
   $(this).trigger('stop');
  })
  .mouseout(function () {
   $(this).trigger('start');
  })
  .mousemove(function (event) {
   if ($(this).data('drag') == true) {
    this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
   }
  })
  .mousedown(function (event) {
   $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
  })
  .mouseup(function () {
   $(this).data('drag', false);
  });
}, 

daysAgo: function (date) {
 // TODO: Fix date for IE...
 if ($.browser.msie) {
  return '1 day ago';
 }

 var d = new Date(date).getTime();
 var n = new Date().getTime();

 var numDays = Math.round(Math.abs(n - d) / (1000 * 60 * 60 * 24));
 var daysAgo = numDays + ' days ago';

 if (numDays == 0) {
  daysAgo = 'today';
 }
 else if (numDays == 1) {
  daysAgo = numDays + ' day ago';
 }

 return daysAgo;
}
};

Tweetstream.init();
</script>
</head>

I hope this isn’t spam, if there’s a thread on here that you think answers the question, please feel free to just point me in the right direction.

Most of the code comes from here: http://andreaslagerkvist.com/archives/2011/06/24/how-to-create-a-scrolling-twitter-feed-using-jquery/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:35:39+00:00Added an answer on June 15, 2026 at 8:35 pm

    Add jquery script tag first and jquery code should be document.ready

    <head>
    <meta charset="UTF-8" />
    <title>UnBox 2013 : Venues</title>
    <link rel="stylesheet" type="text/css" media="all" href="/Volumes/Boot/Users/siddharthnair/Dropbox/UnBox 2013 Build/resonate/style.css" />
    <link href='http://fonts.googleapis.com/css?family=Lekton:400,400italic,700' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,600,400italic,700' rel='stylesheet' type='text/css'>
    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'/> 
    <script src='/Volumes/Boot/Users/siddharthnair/Dropbox/UnBox 2013 Build/resonate/jquery.marquee.js'/> 
    
    
    <script type='text/javascript'>
    $(document).ready(function() {
    var Tweetstream = {
    init: function () {
    this.insertLatestTweets('unboxfestival');
    }, 
    insertLatestTweets: function (username) {
     var limit = 5; // How many feeds do you want?
     var url = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' + username + '&count=' + limit + '&callback=?'; 
    
     $.getJSON(url, function (data) {
      var html = '<marquee behavior="scroll" scrollamount="1" direction="left">';
    
      for (var i in data) {
       html += '<a href="http://twitter.com/' + username + '#status_' + data[i].id_str + '">' + data[i].text + ' <i>' + Twitter.daysAgo(data[i].created_at) + '</i></a>';
      }
    
      html += '</marquee>';
    
      $('.tweetstream p').replaceWith(html);
    
      Twitter.fancyMarquee();
     });
    }, 
    
    fancyMarquee: function () {
     $('.tweetstream marquee').marquee('pointer')
      .mouseover(function () {
       $(this).trigger('stop');
      })
      .mouseout(function () {
       $(this).trigger('start');
      })
      .mousemove(function (event) {
       if ($(this).data('drag') == true) {
        this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
       }
      })
      .mousedown(function (event) {
       $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
      })
      .mouseup(function () {
       $(this).data('drag', false);
      });
    }, 
    
    daysAgo: function (date) {
     // TODO: Fix date for IE...
     if ($.browser.msie) {
      return '1 day ago';
     }
    
     var d = new Date(date).getTime();
     var n = new Date().getTime();
    
     var numDays = Math.round(Math.abs(n - d) / (1000 * 60 * 60 * 24));
     var daysAgo = numDays + ' days ago';
    
     if (numDays == 0) {
      daysAgo = 'today';
     }
     else if (numDays == 1) {
      daysAgo = numDays + ' day ago';
     }
    
     return daysAgo;
    }
    };
    }
    Tweetstream.init();
    </script>
    </head>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first post on Stack Overflow and I'm just wondering on the
this is my first post on this website, but I'm all the time getting
This is my first post, so I'm just getting to know how the community
this is first post here and I am a noob programmer. This may be
This is my first post here and I wanted to get some input from
this is my first post. I am selecting some fields from a database which
This is my first post, so first hallo all. I have a little problem
This is my first post so I hope I am not violating any rules.
This is my first post on SO, so be gentle. I'm not even sure
this is my first post on stackoverflow. I hope my question is not to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.