Q:

Can I use a data-attribute as the href attribute value for an anchor?

I am working with the following code:
<div data-q_id="#strategy" class="vc_row wpb_row section vc_row-fluid">
[...]
</div>

Is there anyway I can use the data-q_id attribute as an achor for a link on the same page?
I would like to be able to do this: 
<a href="[data attribute referenced here]">lorem ipsum</a>
Is this possible? Thanks.

A:

I am not sure if there are many divs with many anchors, but in the case it is just one, this works:
$("a:first").attr("href", $("div:first").data("q_id"));

http://jsfiddle.net/sbp3fvq8/
If there are more divs/anchors, and there is some logic as to how they are related, please update your question.

