Update url parameter jquery

By | JQuery | No Comments

function setGetParameter(paramName, paramValue) { var url = window.location.href; var hash = location.hash; url = url.replace(hash, ”); if (url.indexOf(paramName + “=”) >= 0) { var prefix = url.substring(0, url.indexOf(paramName)); var suffix = url.substring(url.indexOf(paramName)); suffix = suffix.substring(suffix.indexOf(“=”)…

Read More

Time Ago function

By | PHP | No Comments

function time_ago($date) { if(empty($date)) { return “No date provided”; } $periods = array(“second”, “minute”, “hour”, “day”, “week”, “month”, “year”, “decade”); $lengths = array(“60″,”60″,”24″,”7″,”4.35″,”12″,”10”); $now = time(); $unix_date = strtotime($date); // check validity of date if(empty($unix_date))…

Read More

Ready To Stand Out?


Reach Out To Us