thaidomizil Posted November 12, 2011 Share Posted November 12, 2011 Hello, i'm using this piece of code to refresh my div every X seconds: <script> $(document).ready(function() { $("#container").load("stats.php"); var refreshId = setInterval(function() { $("#container").load('stats.php'); }, 9000); $.ajaxSetup({ cache: false }); }); </script> This works great, only thing i want to add is a slider like this one: http://jqueryui.com/demos/slider/#steps I want it to be able to set the interval on the refresh timer which is by default 9000 (ms?) Is it possible to let the slider modify the value ? if so, how can i do that ? thanks! Link to comment https://forums.phpfreaks.com/topic/251025-attach-jquery-slider-to-refresh-script/ Share on other sites More sharing options...
poopinthescoop Posted November 23, 2011 Share Posted November 23, 2011 Just throw a variable into the slider and in the interval? var refreshId = setInterval(function() { $("#container").load('stats.php'); },time); (I didnt download the slider or anything, so bare with me..) time = 800; Link to comment https://forums.phpfreaks.com/topic/251025-attach-jquery-slider-to-refresh-script/#findComment-1290683 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.