Skip to content

Instantly share code, notes, and snippets.

@krschmidt
Last active May 19, 2017 19:10
Show Gist options
  • Save krschmidt/c7cdf1abea1f9aa4734caeae292a4674 to your computer and use it in GitHub Desktop.
Save krschmidt/c7cdf1abea1f9aa4734caeae292a4674 to your computer and use it in GitHub Desktop.
Foundationg Giving fund setter
<script>
setTimeout(function() {
$.urlParam = function(name, url) {
if (!url) {
url = window.location.href;
}
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url);
if (!results) {
return undefined;
}
return results[1] || undefined;
}
if(typeof($.urlParam('fund')) !== 'undefined'){
$('#PC1184_ddlDesignations').val($.urlParam('fund'));
}
}, 700);
</script>
<script>setTimeout(function(){$.urlParam=function(a,b){b||(b=window.location.href);var c=new RegExp("[\\?&]"+a+"=([^&#]*)").exec(b);if(c)return c[1]||void 0},void 0!==$.urlParam("fund")&&$("#PC1184_ddlDesignations").val($.urlParam("fund"))},700);</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment