Register
Already have an account?
Login
let enterKey = document.getElementById("live_tools_search");
enterKey.addEventListener("keydown", (e) =>{
if(e.key === "Enter"){
window.open("https://toolzin.com/tools/?search=" + enterKey.value ,"_self");
}
});
$(".toggle-search").click(function () {
$("#nav_overlay").toggle();
$(".search-box").toggle();
if(document.getElementById("nav_overlay").style.display === "block"){
document.getElementById("live_tools_search").focus();
}
});
$("body").on("keydown", function(e){
if(e.which === 191) {
if($("input").is(":focus")) {
} else {
$("#nav_overlay").toggle();
$(".search-box").toggle();
if(document.getElementById("nav_overlay").style.display === "block"){
document.getElementById("live_tools_search").focus();
}
return false;
}
}
});
var searchRequest = null;
$(function () {
var minlength = 1;
$("#live_tools_search").keyup(function () {
var that = this,
value = $(this).val();
if (value.length >= minlength ) {
if (searchRequest != null)
searchRequest.abort();
searchRequest = $.ajax({
method:'POST',
url: `${site_url}app/includes/Search.php`,
data: {
'search_keyword' : value
},
success: function(msg){
$('#finded_search_container').html(msg);
}
});
} else {
$('#finded_search_container').html("");
}
});
});
$('.navbar-custom-toggler, #main_navbar .menu-overlay').click(function () {
$('#main_navbar').toggleClass('show');
$('html, body').toggleClass('overflow-hidden').animate({scrollTop:0}, 0);
});
$(window).scroll(function (event) {
var scroll = $(window).scrollTop();
if(scroll > 500){
$('.go-to-top').show();
} else {
$('.go-to-top').hide();
}
});
$('.go-to-top').click(function () {
$('html, body').animate({scrollTop:0}, 'slow');
return false;
});
$(".togglecookiesettings").click(function (){
$("html").addClass("show--settings");
});