Powered by eUKhost®

Announcement

Collapse
No announcement yet.

Hiding and showing div container/element in Dragdealer prevents slider from working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hiding and showing div container/element in Dragdealer prevents slider from working

    If you need to hide a slider and display it later on, you'll come across a problem which makes it seem like there is something wrong with your JavaScript code. If you are using Firefox or Chrome and open the Developer Tools, you'll notice your slider mysteriously starts working (in fact, the same applies if you resize your browser window - I assume the slider recalculates its bounds when this event is fired).

    The problem is caused by the Dragdealer needing to recalculate and detect the correct bounds after it is made visible. To do this, in your JavaScript code, use the reflow() method in the section of your code where you make the slider visible.

    Here is an example:

    Code:
    slider.reflow(); // 'slider', in this example, is the Dragdealer instance
    Hope this helps.
    Find us on Twitter and Facebook

    Need to contact us?
    Customer Support: Client Area - 0800 862 0380 (option 2)
    Customer Relations: [email protected] - 0800 862 0380 (option 3)
    Sales: [email protected] - 0800 862 0380 (option 1)




    The opinions or views expressed above are not necessarily the opinions or views of eUKhost Ltd.
ban-img
Working...
X