I'm using the tabs feature from jQuery UI and I need to reload the tab after 5 seconds. I currently have two methods of reloading the data:
- Automatic (jQuery/JavaScript)
- Click link
When reloading the first time automatically and after clicking the reload link, the reload is not following the desired time of 5 seconds.
Example:
- Enter the page - Call method for automatic reload (ok开发者_JS百科 working)
- Pass 3 seconds - Click link for reload manual (ok working)
- Time is obeying the 5 second timeframe.
What options do I have?
It's hard to say without looking the code, but it seems that you need cancel the first setTimeout
call before call it again using the manual action.
Can you show the code?
精彩评论