This commit is contained in:
alexandre-pereira
2015-03-17 19:35:31 +01:00
parent fd46a5720c
commit efc37a61f8
3 changed files with 25 additions and 2 deletions

View File

@ -4,7 +4,7 @@
@section('content')
<div style="text-align:center">
<div><img style="border-radius:50%; height:100px;width:100px;margin:40px;" src="{{ $ref -> image }}"></div>
<img id="imgRef" src="{{ $ref -> image }}"><br>
<div class="game" onclick="location.href='{{ URL::to('memo') }}'"><img src="imgs/memo/memo2.png"></div>
@ -12,3 +12,18 @@
</div>
@endsection
@section('page-scripts')
<script>
var redirect;
document.getElementById('imgRef').addEventListener("mousedown", function() {
redirect = setTimeout(function(){location.href="{{URL::to('choisirref')}}"}, 3000);
});
document.getElementById('imgRef').addEventListener("mouseup", function() {
clearTimeout(redirect);
});
</script>
@endsection