Ok, so I have this ul listed below and the buy now link under it that currently goes to /two_hours. I want it to change the location based on what is clicked. For example if I click the 4 hour button i want the url to the buy now button to go to four_hours and so on.
Here is my jQuery so far:
$(function () {
$('.box-ul .btn .dot').click(function () {
$('.box-ul .btn .dot').not(this).removeClass('clicked');
$(this).toggleClass('clicked');
});
});
HTML:
<div class="box-ul box-time left">
<ul>
<li><span class="yes"></span><p>Easy to Use</p></li>
<li><span class="yes"></span><p>Step by Step<br /><span>details instructions</span></p></li>
<li><span class="yes"></span><p>Setup time<br /><span>under 30 mins</span></p></li>
<li class="btn">
<span class="dot left"></span>
<p class="left">2 hours</p>
<div class="cl"> </div>
</li>
<li class="btn">
<span class="dot left"></span>
<p class="left">4 hours</p>
<div class="cl"> </div>
</li>
<li class="btn">
<span class="dot left"></span>
<p class="left">8 hours</p>
<div class="cl"> </div>
</li>
<li class="btn">
<span class="dot left"></span>
<p class="left">12 hours</p>
<div class="cl"> </div>
</li>
</ul>
<div class="cl"> </div>
<a href="/two_hours" class="buy">Buy Now</a>
</div>
<div class="cl"> </div>