Monday, 15 September 2014

javascript - ScrollTop between 3 vertically aligned divs won't work from MID to BOT and glitches from BOT to MID -


Update: I have tried to remove the viewport size for some elements , And still looking for any advice for removing some features, but still facing the same behavior described in 5 steps.

I have no clue why this is happening. I have 3 divisors and a certain navigation on top of each other. I am using scrollTop: $ ("# targetDIV ") Offset (). scrollTop for each of the three divs is called from one of three .click () function; One per button

You should be able to describe in the heading title by following these steps:

  1. Click on "Mid
    < Div>
  2. Now click on the "last DIV" button and nothing should be
  3. Page
  4. "last DIV" Click on the button and you will be taken to the last device with "Final Divya Content"
  5. Now click on the "Mid Divis" button and instead click on the media div at the top level C It goes with "This is the top level"

From the top part, I can get the MID and Bot completely fine.

I highly appreciate it If you can tell me what I am missing, or possibly what could be the reason for this strange behavior.

When info_overlay is scrolled, the offset () changes in its children's top .

An optional

Could Also, since it is associated with children's ID, the offset (all children). The top is to save before saving.

"BTN" classname, you can write a click handler instead of three:

  $ ('. Inf_con_block'). Each (function () {$ (this). Data ('offset', $ (this). Offset (). Top-100);}); $ ('.inav_btn'). Click (function () {var d = '#con_' + $ (this) .attr ('class'). Split ('btn _') [1]; $ ('# info_overlay') .Mate ({scrollTop : $ (D) .data ('offset')}, 1000);});               Add  info_overlay  to scrollTop , and it will "offset" the offset (). Click on its children's top : 

  $ ('.inv_btn') (function () {var d = '#con_' + $ (this) .attr ('class 'Split (' btn_ ') [1]; $ (' #info_overlay '). Chetan ({scrollTop: ($ (d). Offset (. Top-100) + $ (' # info_overlay '). ScrollTop ()}, 1000);});  


No comments:

Post a Comment