Discussion:
detaching element bound with the ui slider widget doesn't re-attach to the dom
jebaird
2010-02-24 19:38:12 UTC
Permalink
While playing with the slider widget and .detach() i noticed that if
you attach the slider widget to an element the .detach() that element
from the dom and try to re-atach it the slider doesnt show up again.
its as if i called the destroy method.

take this code for example

<div id="sliderTest"></div>

$('#sliderTest').slider();
var sliderTest;
//remove the slider
setTimeout(function(){
sliderTest=$('#sliderTest').detach();

},1000);


//add it again a bit later
setTimeout(function(){

$('body').append(sliderTest);
console.dir(sliderTest);
},3000);


if you replace the slider widget with datepicker, the calendar appears
then disapears then appears agian. has any one experienced this
before? is this a bug?

Loading...