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

  • Home
  • SEARCH
  • 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 8941165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:14:16+00:00 2026-06-15T11:14:16+00:00

Just trying to get the nivo slider plugin for jquery working on a basic

  • 0

Just trying to get the nivo slider plugin for jquery working on a basic rails app. Tried the simplest proof of concept I could, just putting the demo into a static html page in the public folder, but I still can’t get it to work. Here is the current header I’m using:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html lang="en">
<head>
    <script type="text/javascript" src="../vendor/assets/javascripts/nivo-slider/demo/scripts/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="../vendor/assets/javascripts/nivo-slider/jquery.nivo.slider.js"></script>
    <title>Nivo Slider Demo</title>
    <link rel="stylesheet" href="../vendor/assets/javascripts/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../vendor/assets/javascripts/nivo-slider/themes/light/light.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../vendor/assets/javascripts/nivo-slider/themes/dark/dark.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../vendor/assets/javascripts/nivo-slider/themes/bar/bar.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../vendor/assets/javascripts/nivo-slider/nivo-slider.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../vendor/assets/javascripts/nivo-slider/demo/style.css" type="text/css" media="screen" />

        <script type="text/javascript">
        $(window).load(function() {
            $('#slider').nivoSlider();
        });
    </script>

</head>

Every time this loads up in heroku though I get the error: ReferenceError:

$ is not defined    

$(window).load(function() {

I’m fairly new to web development in general, but I just don’t know how to fix this. Ideas?

  • 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-15T11:14:17+00:00Added an answer on June 15, 2026 at 11:14 am

    JQuery is not being loaded. You are using relative paths in rails. If you must manually load your javascripts you should consider using:

    You can <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> to manually add it.


    A better approach is to use the asset pipeline for all javascript.

    You have taken out the javascript_include_tag "application" code from the layout file which is normally in: /app/views/layouts/application.html.erb.

    You should put it back and then use the asset pipeline to take care of jQuery and your code for you.

    Relative paths are allowed in rails, but may not work as expected. Rails only serves assets from the public directory not the vendor directory. Normally you just let rails compile all js/css to one file and it is served out of the public/assets directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just trying to get a proof of concept of Jenkins working on
Just trying out scrapy and trying to get a basic spider working. I know
I'm just trying to get a simple test app working with AlarmManager. public class
Just trying to get a very basic install of slime and clojure working, but
Just trying to get a handle on blocks. I get the concept. They're like
I'm learning rails and I'm just trying to get the basics down. I just
All, I am just trying to get the zpipe demo working using dev-c++ where
I'm sure I'm missing something, but I'm just trying to get an app widget
Just trying to get to grips with the new Rails 3.1 way of managing
I'm just trying to get a simple mp3 player working. I'm getting an error

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.