开发者

jQuery Countdown on expiry new layout not new url

开发者 https://www.devze.com 2023-02-01 00:18 出处:网络
Im using jquery countdown开发者_运维知识库 http://keith-wood.name/countdown.html I want the page to refresh when the countdown is finished and reload a new page layout ( on the same url) I figured ou

Im using jquery countdown开发者_运维知识库 http://keith-wood.name/countdown.html

I want the page to refresh when the countdown is finished and reload a new page layout ( on the same url) I figured out how to redirect but am racking my head to figure out page refresh to new layout.

Any help welcome!


I want the page to refresh when the countdown is finished and reload a new page layout ( on the same url) I figured out how to redirect but am racking my head to figure out page refresh to new layout.

If you want to refresh the page, you can do this:

document.location.reload();

But off course you would put above line where necessary for example the counter finishes.


Personally i prefere the jquery plugin doTimeout.

Just add to open in a new window :

$.doTimeout( 2000, function(){
  return window.open(location.href, '_blank');
});

Or just this to open in the same window :

$.doTimeout( 2000, function(){
  return window.location(location.href);
});
0

精彩评论

暂无评论...
验证码 换一张
取 消