(function () { var input = document.querySelector('#input'); input.addEventListener("input", function(e) { document.querySelector('#mySidenav').classList.remove("bg-opacity-75") if(e.target.value.length >2){ const xhr = new XMLHttpRequest(); xhr.onload=function(){ const serverReponse=document.querySelector("#div1"); serverReponse.innerHTML=this.responseText; }; var url="https://www.bollywoodmdb.com/search?search="+ e.target.value; xhr.open("GET", url); xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xhr.send(); } }); })(); $('#calenderlistt').children('#calenderChildd').each(function() { let $this = $(this); if ($this.width() < $('#calenderlistt').width()) { $('#scrollbtn').css('display','none'); } }) $(".search_btn").on('click', function(){ $("#mySidenav").css("width" ,"32.24rem"); // $("#input").focus(); document.querySelector("#input").focus(); }); $("#clear").on('click', function(){ $("#input").val(""); }); $("#close_btn").on('click', function(){ $("#mySidenav").css("width" ,"0"); }); $(".login").on('click', function(){ $("#myModal").show(); }); $("#close").on('click', function(){ $("#myModal").hide(); }); $("#facebook").on('click', function(){ var urlpop=$("#facebook").val(); window.open(urlpop, "_blank"); }); $("#google").on('click', function(){ var urlpop=$("#google").val(); window.open(urlpop, "_blank"); }); $("#movieDirtFoo").on('click', function(){ $("#movieDireLi").removeClass("hidden"); $("#celeDireLi").addClass("hidden"); $("#compDireLi").addClass("hidden"); $("#movieDirtFoo").addClass("activeDirect"); $("#companyDirtFoo").removeClass("activeDirect"); $("#celeDirtFoo").removeClass("activeDirect"); $("#movieDirYr").removeClass("hidden"); }); $("#companyDirtFoo").on('click', function(){ $("#movieDireLi").addClass("hidden"); $("#celeDireLi").addClass("hidden"); $("#compDireLi").removeClass("hidden"); $("#movieDirtFoo").removeClass("activeDirect"); $("#companyDirtFoo").addClass("activeDirect"); $("#celeDirtFoo").removeClass("activeDirect"); $("#movieDirYr").addClass("hidden"); }); $("#celeDirtFoo").on('click', function(){ $("#movieDireLi").addClass("hidden"); $("#celeDireLi").removeClass("hidden"); $("#compDireLi").addClass("hidden"); $("#movieDirtFoo").removeClass("activeDirect"); $("#companyDirtFoo").removeClass("activeDirect"); $("#celeDirtFoo").addClass("activeDirect"); $("#movieDirYr").addClass("hidden"); });