Thursday, November 14, 2013

Make money fast with sharecash

http://www.youtube.com/v/PRJ5TX6cf4Q?autohide=1&version=3&autoplay=1&attribution_tag=jN5_qqm2QAEsqMjj7aopjg&feature=share&autohide=1&showinfo=1

Saturday, July 14, 2012

Different ways to refresh or reload page using jQuery

different ways using which you can reload or refresh the webpage using jQuery. The first method is nothing to do with jQuery. It is a HTML tag which you need to put in the head section of your page and your page will get refreshed automatically after specified interval.

1<meta http-equiv="refresh" content="10">
The meta tag with "http-equiv" is used to refresh the page. This attribute tells the browser that this meta tag is sending an HTTP command rather than a standard meta tag. Refresh is an actual HTTP header used by the web server.The content attribute in the tag is having value in seconds. As per the above code, it is set to 10, which means after 10 seconds your page will get refreshed or reloaded.

You can also use jQuery to refresh/reload the page automatically. See below jQuery code.
1function ReloadPage() {
2   location.reload();
3};


5$(document).ready(function() {
6  setTimeout("ReloadPage()", 10000); .
7});
location.reload() will reload the page again. The advantage of location.reload() is that it works with all the major browsers.

If you want to reload the page on click of button, then you can call location.reload() on button click event. See below jQuery code.
1$(document).ready(function() {
2     $('#btnReload').click(function() {
3             location.reload();
4       });
5});