Dragdealer.js is not working in hide/show div
I put the drag Dealer in a div that is hidden by css (display:none), then when i show the div through jquery (.show()) the div shows the slider but it doesnt Drag.
No error in de firebug console.
any ideas?
The same problem in my test case. Slider wrapper at the beginning is hidden(display: none).
I see the same issue using sliders in an accordion. Resizing the browser seems to init the slider but the drag element is not at the start.
I know this is an old issue by now, but wasn't able to find any solution but found the solution. The problem is in the function 'calculateBounds' in dragdealer.js, as it try to get the offsetWidth of your hidden element, as it's is hidden the element doesn't 'exist' to the function, so it put the default value of '0' (zero). The solution I found out is to make the element visible at the beginning of calculateBounds function and then, before the "return bounds' line, hide the element again (or in my case, as the hide/show behavior is dynamic, I put a variable/flag to determinate if it has to keep the element shown or hide it again... hope it make sense. Another solution that might apply is to clone the hidden element, append it to the body, get the offsetHeight of the new element, then detach it.