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 6947275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:40:23+00:00 2026-05-27T13:40:23+00:00

EDIT: new error: Error Jquery not defined line: 208 Line 208 in this code:

  • 0

EDIT: new error: Error Jquery not defined line: 208

Line 208 in this code: https://github.com/litera/jquery-scrollintoview/blob/master/jquery.scrollintoview.js

enter image description here

I’m not sure why I’m getting this error because I got everything working right in a jsfiddle, but when I added the code to my rails app it wont work. When I click on the error to learn more the section complete: function() { is highlighted.

Clicking the link causes the hidden div to appear and the link to become ‘active’ (color: red), however, the window does not scroll to the bottom of the div, and when I click the link to toggle everything nothing happens (div doesn’t close and link stays red).

Original jsfiddle where things work : http://jsfiddle.net/Gr7BP/

application.js

$(function() {

    $("#created").hide();

    $('a.created-button').click(function() {

        $('#created').toggle(function() {
            $('a.created-button').toggleClass('active');
            $('#created').scrollintoview({
                duration: "slow",
                direction: "y", 
                complete: function() {
                        // highlight the element so user's focus gets where it needs to be
                }
            });
        });
    });
});

$(function() {

    $("#stuff").hide();

    $('a.stuff-button').click(function() {

        $('#stuff').toggle(function() {
            $('a.stuff-button').toggleClass('active');
            $('#stuff').scrollintoview({
                duration: "slow",
                direction: "y",
                complete: function() {
                        // highlight the element so user's focus gets where it needs to be
                }
            });
        });
    });
});

footer

<footer>
 <div id="created-by"><a class="created-button">Created by</a></div> 
 <div id="cool-stuff"><a class="stuff-button">Cool stuff</a></div>

</footer>
<div id="created">

</div>
<div id="stuff">

</div>

css

#created {
    margin: 0 auto;
    width: 100%;
    height: 150px;
    background: green;

}
#stuff {
    margin: 0 auto;
    width: 100%;
    height: 150px;
    background: white;

}

.active {
    color: red;
}

edit: shows error with non camel casing

  • 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-05-27T13:40:24+00:00Added an answer on May 27, 2026 at 1:40 pm

    It is because the function you are calling is scrollIntoView() (in camelCasing) while the function defined is scrollintoview() (not in camelCasing)

    Note : JavaScript is a case sensitive language.

    Make sure you have included the JavaScript files in the correct order. First, load the jQuery library, then the scrollintoview plugin and finally your application.js

    EDIT: Updated the answer as per the discussion in comments.

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

Sidebar

Related Questions

This works: Entities.WorkOrderSet.Where(MyCustomMethod); This does not: Entities.WorkOrderSet.Where(o => MyCustomMethod(o)); ( [Edit] Even without new
EDIT : Check at the end of this for the solution I am new
I'm really new at this jquery stuff. I have a wcf web service running
I'm trying to reorganize some controller code into .js.erb jquery files. (Warning, this is
The following code works for me using jQuery 1.2.6 but causes a broker error
I'm pretty new to jQuery (and javascript for that matter), so this is probably
I tried to use the method data (jQuery 1.7.1) in this code: var q
Why new()/delete() is slower than malloc()/free()? EDIT: Thanks for the answers so far. Please
In Visual Studio 2008 add a new DataGridView to a form Edit Columns Add
new_story GET /story/new(.:format) {:action=>new, :controller=>stories} edit_story GET /story/edit(.:format) {:action=>edit, :controller=>stories} story GET /story(.:format) {:action=>show,

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.