Skip to content

Instantly share code, notes, and snippets.

@herbie4
Created August 12, 2022 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herbie4/9ef5e81b64c5f07f05b9f8c0377ff1d9 to your computer and use it in GitHub Desktop.
Save herbie4/9ef5e81b64c5f07f05b9f8c0377ff1d9 to your computer and use it in GitHub Desktop.
hhdev Avada get url parameter to open modal
function getParameter(p)
{
var url = window.location.search.substring(1);
var varUrl = url.split('&');
for (var i = 0; i < varUrl.length; i++)
{
var parameter = varUrl[i].split('=');
if (parameter[0] == p)
{
return parameter[1];
}
}
}
jQuery(document).ready(function ($) {
var name = getParameter('modal');
if(name = 'wholesale') $('.fusion-modal-text-link').click();
#console.log(name);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment