setting top on scroll not scrolling smoothly

I am trying to update the the top attribute of a div on scroll of the window. It works fine, except that using with the mouse wheel, the div is not scrolling up and down smoothly. Using the keyboard or the scroll bar on the right of the page works fine.

Here is my code:

$(window).scroll(function() { $('.className').css('top',$(window).scrollTop() + 115); });

My assumption is that it takes a few milliseconds to calculate the new top value each time I scroll. But then why is the issue firing only using mouse wheel?

Category:javascript Time:2018-12-22 Views:2

Related post

  • Windows Media Center: Set Top Box Manufacturer Not Found 2013-11-23

    During setup, Windows automatically "finds" my remote when I press and hold down 0. When I get to the next step to change the channels using the WMC remote that I have, nothing happens. I can enter the numbers, but the station is not changed. Once I

  • How to set a view to NOT scroll with scrollview in Java 2011-03-15

    is it possible to programmically force a View inside a ScrollView NOT to scroll? Like the alphabetic titles in the contacts list. The 'A' bar doesn't scroll when the user scrolls through the list of all contacts whose first names start with 'A'. When

  • jQuery smooth div scroll not scrolling dynamically created paragraph tags 2011-10-10

    I'm building a stock ticker and I'm trying to use the Smooth Div Scroll plugin but I can't get it to work with dynamically created paragraph tags. Rather than creating a scrolling, horizontal list, it just dumps the P tags onto the page vertically. I

  • Can I programmatically set a wallpaper to not scroll? 2010-10-01

    I am writing an app that allows a user to set the phone's wallpaper from a list of pictures. By default it scrolls across the multiple home screens. I want the wallpaper on the home screen to be a static non-scrolling image. What can I do programmati

  • SparkDataContainer Scroller not scrolling to bottom of container 2010-03-29

    I am using a scroller component within a custom skin for a SkinnableDataContainer. I am running into an issue in that the thumbbar of the scroller stops at about the 50% point, however this is actually the end of the scrollable area. In actuality, th

  • “Windows Media Center cannot detect IR control cables, which are required to control the set top box. Attach IR hardware that supports IR control cables and then try again. IR HARDWARE NOT DETECTED." 2012-08-05

    Original title:When setting up Windows Media Center, I receive error message: "IR Hardware Not Detected". I have an internal TV Tuner that was installed by HP when I recently purchased a "build-your-own computer". (According to Device Manager on the

  • Vista Media center :Problem Identifying IR Set top box remote 2012-08-09

    Hi , I use Pinnacle PCTV 110i Analog Pro TV tuner : Recently i bought a Pinnacle PCTV media center remote kit (it is certified to work with Windows vista's Media Center)

  • How do I set up a TV set top box that has no IR controller? 2014-01-17

    I am trying to set up Media Center on Win7 with a USB TV tuner. I can get teh Antenna channels just fine, nbut every time I try to set up the external set top box, the wizard want to set up the IR controller. My set top box does not have an IR contro

  • Media Center and multiple Set Top boxes 2014-12-15

    I have Win7 RTM Media Center Set up, and it is working pretty well. I use two Clear QAM tuners, and one Comcast Set Top Box (capture via composite and audio - control via IR Blaster). I was trying to configure a second Set Top Box, but when I do MC s

  • TextView not scrolling Smoothly 2012-03-23

    I am trying to scroll my textview using folling code: TextView text = (TextView) findViewById(; text.setMovementMethod(ScrollingMovementMethod.getInstance()); int height = getResources().getDrawable(R.drawable.pic_ground_pranic).getIn

  • UIScrollview not scrolling smoothly 2011-06-28

    I have used scrollview and in that scrollview i have added text image now when i scroll the scrolling effect is not smooth it is either going up or down. The code i have used is: mScrollView.delegate = self; //mScrollView.showsHorizontalScrollIndicat

  • UIScrollView not scrolling to the top 2011-12-28

    I have a scrollview where I dynamically adjust its contentSize depending on what content is in the scrollview. The problem is that after having done all the adjustments it is not scrolled to the top. I tried with setting the contentOffset to 0,0 but

  • UICollectionView scrolling not smooth when using NSFetchResultsController 2014-05-09

    I am using UICollectionView with NSFetchResultsController to present the different sets of photos. This is the first time I am using both UICollectionView & NSFetchResultsController. Here is my code : - (UICollectionViewCell *)collectionView:(UIC

  • Scroll view not scrolled when setting the height of the child view to Ti.UI.SIZE Titanium 2015-02-09

    I have a scroll view which has a content height to auto and inside of it i have a view which contain all the UI element i'm using but my problem is when i set the height of the view to Ti.UI.SIZE the scroll view not scrolled it's just scrolled in cas

  • Smooth link scrolling not on whole body, but certain div 2016-01-02

    I'm using this code for smooth link scrolling: function filterPath(string) { return string .replace(/^\//,'') .replace(/(index|default).[a-zA-Z]{3,4}$/,'') .replace(/\/$/,''); } $('a[href*=#]').each(function() { if ( filterPath(location.pathname) ==

  • Overlays with MkMapView do not scroll smoothly 2010-04-23

    By overriding the drawrect of my MkAnnotationViews, I am displaying paths using CoreGraphics. The problem I have is when I zoom in pretty close and scroll the map view, the paths drawn by CoreGraphics seem to be really jumpy, as if they are updated o

  • UITableView not scrolling smoothly-(iPhone SDK) ..! 2010-10-18

    UITableView not scrolling smoothly...(iPhone SDK) ..!! I have implemented UITableView DataSource and Delegate methods in an individual separate classes.(one for delegate and one for datasource) in main program i write only: //assume that all objects

  • Set a div inside of a div to scroll, while parent does not scroll 2011-12-15

    I have a container div that holds many child divs. One of the divs in my container houses comments. Instead of setting the whole div to scroll, I want everything to stay in place, leaving only the comments div to scroll. I have tried setting the pare

  • UITableview not scrolling smoothly 2012-02-10

    I have UITableView in my application & have created tableview cell normally with creating any class file. In my table cell i'm adding UITextview due to which my UITableView is " not scrolling smoothly ". After I comment textview code or replaces

Copyright (C), All Rights Reserved.

processed in 0.650 (s). 13 q(s)