Still new at this … Sorry! I have a template for multiple pages that functions differently on each one. As in, the layout looks the same, but the page might be for design, upload, pricing, or getting a template.
On the left is a button for if they know their product dimensions. Clicking the button takes them to the appropriate page based on their need (i.e. upload page if they clicked the upload button). The button is dynamic with the template like so:
<a id="sg-start-button" class="button blue" href="javascript:void(0);" name="<?php echo $guide_action; ?>">Start Designing!</a>
And the script is supposed to pull the value from the “name” attribute and act accordingly.
I’m just not sure how to specify to jquery to look at that value. Here’s what I have:
$('#sg-start-button').click(function() {
var $guide_action = $('#sg-start-button').I NEED THIS();
if($guide_action == 'design') start_action(0);
if($guide_action == 'upload') start_action(1);
if($guide_action == 'template') start_action(2);
if($guide_action == 'price') start_action(3);
});
I tried the attr tag (.attr(‘name’)) but that wasn’t it. Appreciate any help. Thanks!
I think you want something like this: