Project links to new tab, ignore events on a click too

This commit is contained in:
Felipe Martín 2015-03-21 23:55:14 +01:00
parent 5be4f96651
commit 5ddfacfb9a
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@
<h5 class="stack"><i class="fa fa-cogs"></i> {{ project.stack }}</h5>
{% endif %}
{% if project.url %}
<h5 class="url"><i class="fa fa-link"></i> <a href="{{ project.url }}">{{ project.url }}</a></h5>
<h5 class="url"><i class="fa fa-link"></i> <a href="{{ project.url }}" target="_blank">{{ project.url }}</a></h5>
{% endif %}
<div class="text-center images">
{% for image in project.images.all() %}
@ -57,7 +57,7 @@
<script type="text/javascript">
$(function() {
$('[data-toggle-on-click]').click(function(event) {
if (!$(event.target).is('img'))
if (!$(event.target).is('img') && !$(event.target).is('a'))
$(this).children('[data-viewmore]').slideToggle(300);
})
})