I’m guessing this is a really dumb question, but I’m far more familiar with PHP/WordPress and I’m just getting started with jQuery so I’m not even sure what to search on. Is there a way to pass the output of
echo get_blogifo('siteurl')
To jQuery? I’m trying to get this to work:
$('a.getstarted').attr('href', '<?php echo get_bloginfo('siteurl'); ?>/payroll-deduction-authorization/?plan=basic');
Thanks in advance for your help!
Use wp_localize_script() to pass variables to the front end so that you can pick them by javascript.
Use it like this:
And pick it up like
object_name.some_string
in javascript code.