Giter Club home page Giter Club logo

Comments (3)

rowanbeentje avatar rowanbeentje commented on July 21, 2024

Hi altoenergy,

The method you want is scrollerInstance.updateDimensions() (you don't ned to pass in dimensions - the docs need to clarify this).

Is all you're doing to trigger the problem setting a style.display property on one of the inner elements? Which browser version? We should probably pin that down...

from ftscroller.

altoenergy avatar altoenergy commented on July 21, 2024

Thanks, I will try that.

Yes, it's a simple show / hide on the element...

I have the following (crudely)

<div id='header'> // position : fixed
</div>
<div id='content'> // position : fixed
  <button>Show tab 1</button>
  <button>Show tab 2</button>
  <button>Show tab 3</button>
  <div id='tab1'>
  </div>
  <div id='tab2'>
  </div>
  <div id='tab3'>
  </div>
</div>
<div id='footer'> // position : fixed
</div>

The html is being dynamically injected into 'content' at runtime.
The button on-click is $("#tabX").show().siblings().hide()

The order of events is...

  • new 'content' injected
  • scroller is attached to 'content' (at this stage, all tabs are visible !)
  • tab 1 is made visible, others are hidden
  • scroller responds to this (and correctly respects the length of tab 1)
  • subsequent user button clicks hide / display other tabs
  • scroller does not respond to these changes (it continues to respect the length of tab 1)

So,
If tab 1 is the shortest content, other tabs may lack sufficient scrolling.
If tab 1 is the longest content, other tabs may have excessive scrolling into blank space.

Sorry I didn't give browser info before.
I see the problem on Safari (iOS 7 and OSX 6.0.5) but ok on Chrome 30.0.1599.69.

Thanks.

from ftscroller.

azariah001 avatar azariah001 commented on July 21, 2024

I've got a similar problem. I've got a div that I'm adding content into dynamically via Javascript. The scroller resizes no problem when I add rows to the div but..... when I change the height of the text boxes the row's contain it doesn't recognize the change in size. Will try to bind the FTScroller update command to the event that manages the text box resize. :)

Bootstrap 3
Flat-UI 1.2.2
JQuery 1.8.3
JQuery UI 1.10.3
JQuery UI Touch
Chrome 31.0.1650.63 in Linux Mint

from ftscroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.