Showing posts from October, 2016

Set today and tomorrow date in jQuery datepicker

In the change function of the first datepicker, create a date object, set the date one day forward, and set the date of the second datepicker to that date. You can use minDate to make sure any date earlier than the set date can not be picked.
$(function(){ $("#arrival").datepicker({ dateFormat:"dd/mm/yy", changeMonth:true, changeYear:true, numberOfMonths:1, yearRange:":2016", minDate:"dateToday", onClose:function(selectedDate){var myDate = $(this).datepicker('getDate'); myDate.setDate(myDate.getDate()+1); $('#departure').datepicker('setDate', myDate);}}); $("#depart

Redirect automatically after short delay on Error 404 page in wordpress

You should use a client side redirection method to apply the proper delay. If you want to support browsers with disabled JavaScript, just paste a META refresh into a noscript element. It is better to place it inside a noscript element because search engines give a penalty for usual META refresh links. If the redirect is permanent, I suggest you to use the canonical tag too to keep the link-juice of missing pages. Use Below code on 404.php of your current theme<linkrel="canonical"href=""/><noscript><metahttp-equiv="refresh"content="5;URL="></noscript><!--[if lt IE 9]><script type="text/javascript">var IE_fix=true;</script><![endif]--><scripttype="text/javascript">var url ="";var delay ="5000"; window.onload =function(){ setTimeout(GoToURL, delay);}functionGoToURL(){if(typeof IE_fix …