Click area
by casperskovgaard
HTML
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/animatecss/3.4.0/animate.min.css">
<section id="steps-section">
<div class="container">
<div class="row">
<div class="col-xs-3 text-center">
<div class="click-area">
<h3>Test 123</h3>
<p>text text text text text text text text text text</p>
<a href="#budget-section">link</a>
</div>
</div>
<div class="col-xs-3 text-center">
<div class="click-area">
<h3>Test 123</h3>
<p>text text text text text text text text text text</p>
<a href="#" data-toggle="modal" data-target="#myModal">link modal</a>
</div>
</div>
<div class="col-xs-3 text-center">
<div class="click-area">
<h3>Test 123</h3>
<p>text text text text text text text text text text</p>
<a href="http://google.com">Google</a>
</div>
</div>
</div>
</div>
</section>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn...
CSS
.click-area {
cursor: pointer;
}
.click-area:hover {
color: #666;
}
JavaScript
$(".click-area").click(function () {
console.log($(this).find("a").first().prop('href'));
$(this).find("a").first().click();
//window.location = $(this).find("a").first().prop('href');
//return false;
});