how to use value from js in href?
<p>how to get data-phone (from alloka.js, doesn't matter) value in href?</p>

<p>this doesn't work: </p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script type="text/javascript"  src="http://analytics.alloka.ru/v4/alloka.js" &gt;
    $(document).ready(function() {
        var href = $('span').attr('data-phone');
        $('.t282__logo').attr( 'href', href); 
    })
&lt;/script&gt; 
&lt;a class="t282__logo"  href="tel:"&gt;&lt;span class="phone-alloka"&gt;&lt;/span&gt;&lt;/a&gt;</code></pre>
</div>
</div>
</p>