Thank you for purchasing!

View the Tutorial

END USER AGREEMENT: Purchasing this code gives you the rights to use it in your projects but not to redistribute it to others through cloneables or any other method of sharing the code. For a license to use this code in a template, please contact T.RICKS. This code is listed as is. No modifications or updates can be requested. However, if T.RICKS decides to make any future modifications or improvements to the code, you will be granted access. Purchasing this code is not in exchange for any support from T.RICKS in implementing it in your project or in exchange for any other personal service.

<style>
.no-select {
-webkit-touch-callout:none;
-webkit-user-select:none;
-khtml-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
-webkit-tap-highlight-color:rgba(0,0,0,0);
}

.tricks-no-touch {pointer-events: none;}
.tricks-contain {cursor: grab;}
.tricks-drag {position: relative;}
.tricks-press {cursor: pointer;}

.tricks-cover {
  position: absolute;
  left: 0%;
  top: 0%;
  right: 0%;
  bottom: 0%;
  z-index: 100;
}
</style>

<script>
// © Code by T.RICKS, <https://www.tricksdesign.com/>
// Copyright 2020, T.RICKS, All rights reserved.
// You have the license to use this code in your projects but not to redistribute it to others

var tricksNumber = $('.tricks-number').text();
var tricksTime = +tricksNumber;
var tricksURL = $(".tricks-url").attr('href');
var tricksNewPage;

function tricksLinkPage() {
     tricksNewPage = window.setTimeout(function () {
        location.href = tricksURL;
    }, tricksTime);  
}

function stopTricksLinkPage() {
  clearTimeout(tricksNewPage);
}

$('.tricks-press').bind('touchstart mousedown', function(e){
  $( ".tricks-number" ).click();
  tricksLinkPage()
  $('body').addClass('no-select');
});

$('.tricks-press').bind('touchend mouseup', function(e){
  $( ".tricks-number" ).click();
  stopTricksLinkPage();
  $('body').removeClass('no-select');
});

$('.tricks-drag').addClass('tricks-no-touch');

$('.tricks-drag').append("<div class='tricks-cover'></div>");

$('.tricks-contain').mousedown(function() {
  $('.tricks-drag').removeClass('tricks-no-touch');
  $('body').addClass('no-select');
  $('.tricks-cover').css('display', 'none');
});

$('.tricks-contain').mouseup(function() {
  $('.tricks-drag').addClass('tricks-no-touch');
  $('body').removeClass('no-select');
  $('.tricks-cover').css('display', 'block');
});

$('.tricks-contain').mouseleave(function() {
  $('.tricks-drag').addClass('tricks-no-touch');
  $('body').removeClass('no-select');
  $('.tricks-cover').css('display', 'block');
});

$('.tricks-trigger').mouseup(function() {
  location.href = tricksURL;
});

</script>