jQuery UI Endless Loop when referencing a slider that doesn't exist -
if page hangs: var foo = $("#mysliderthatdoesntexist").slider("value");
so may wonder why reference slider doesn't exist? it's called function that's run on page load , when changes on page (server side generates slider on page load).
i wouldn't have thought cause whole page freeze , consume ram on pc.
a bug perhaps? latest stable jquery & jquery ui
you shouldn't have guess workaround be:
var $mysliderthatdoesntexist = $("#mysliderthatdoesntexist"); var foo = ($mysliderthatdoesntexist.length >= 1) ? $mysliderthatdoesntexist.slider("value") : 0;
Comments
Post a Comment