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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:20:56+00:00 2026-06-11T00:20:56+00:00

I have a scrolling plugin which after initialization stores the scroll amount in the

  • 0

I have a scrolling plugin which after initialization stores the scroll amount in the specific id.

I am using jQuery to get the id of the div and storing it in variable bid.

var bid = $(this).parent().parent().find(".video_s").attr('id');

In console var bid returns the element ID. (This Works correctly)

As the scroll amount is stored in objects specific to DOM element IDs

var bpos = bid.scrollData.scrollPosition[0][0];

THE ABOVE CODE IS NOT WORKING

variable bid contains the id of the element.

If i type elementID.scrollData.scrollPosition[0][0] in console, it perfectly returns the scroll amount. where elementID is the specific ID if the horizontal container.

Please can anybody tell me whats wrong?

SOLUTION 1:
window[bid].scrollData.scrollPosition[0][0]

SOLUTION 2:
eval(bid).scrollData.scrollPosition[0][0]

NOTE: never use eval(). eval() is slow and a security risk

  • 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-11T00:20:57+00:00Added an answer on June 11, 2026 at 12:20 am

    Since bid is only the string containing the element-id but you need a jQuery Object containing the actual dom-element, the code should be:

    var bpos = $('#'+bid).scrollData.scrollPosition[0][0];
    

    $('#'+bid) gets the element according to ID stored in bid.

    In the case of this plugin the elements are stored in a global variable (which is btw. very bad programming style), so you can use the following to access them:

    window[bid].scrollData.scrollPosition[0][0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using the jQuery SmoothDivScroll plugin. http://www.smoothdivscroll.com/ I want to have continuous scrolling, but
Im using Karl Swedberg's jquery smooth scrolling plugin for same page links: https://github.com/kswedberg/jquery-smooth-scroll The
I am using the Jquery serialScroll plugin and have made a horizontal gallery which
I have some strange scrolling problems with my PhoneGap (using jQuery Mobile) app: I'm
I am using the jCarousel plugin from http://sorgalla.com/jcarousel/ I have the carousel automatically scrolling
I have a scrolling DIV that via JQuery determines the element in the middle.
I have a jQuery plugin, which appears the box with Facebook Like button in
I am working on Project where I have JQuery 1-Page Horizontal scrolling website using
Hi i am using simply scroll plugin from this site http://logicbox.net/jquery/simplyscroll/ but i am
I have and issue with scrolling content of a jScrollPane div using the mousewheel,

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.