View file File name : search-filter-new.php Content :<style> form#headersearchfrm { position: relative; } #product-area-search .restallsectioncat.newtags.alcoholtag span.clsPrice img.clsStoreImg { background:#8b0c06; } #product-area-search #finalstorelisthtml ul.childfilter li label { clear: left; width: 100%; display: block; } #product-area-search .clsProd .clsQty select { min-width:60px; } #product-area-search #finalstorelisthtml ul.childfilter li label span { margin-left:0px; } #product-area-search #finalstorelisthtml span.storeinput { width: 20px; height: 27px; float: left; } .search-dropbox { width: 100%; position: relative; z-index: 2; left: 0; right: 0; background: #fff; min-height:200vh; /* height: calc(100vh - 63px); */ top: 0px; /* overflow-y: scroll;*/ border-top: 1px solid #eaeaea; text-align:left !important; } header .clsSearchBox .clsSearchBtn.crossbtn { background-size: 25px !important; background-image: url(https://www.quicklly.com/images/searchcrossbtn.svg) !important; background: transparent; background-repeat: no-repeat; background-position: center; right:-32px; } #product-area-search .clsProd .clsTitle { display: block; padding: 0 15px; font-weight: 500; height: 12.6px; color: #000; font-size: 12px; } #product-area-search .clsProd .clsProdImg { max-width: 160px; margin: 0 auto; margin-bottom: 0px; margin-top: 0px; height: 140px; padding:20px; } #product-area-search .restallsectioncat { margin-bottom: 0px; padding: 0px 5px; margin-top:15px; } #product-area-search .onlyformealkitcat { flex-direction: column; margin-bottom:5px; } #product-area-search .clsSearchPg { clear:both; padding: 0px 20px; } #product-area-search .clsSearchPg div#load_data_search { clear: both; } #product-area-search .clsProd .clsPrice { text-align:left; color: #000; border-left:0px; } #product-area-search span.clsPrice span { color: #707070; } #product-area-search span.clsPrice label { position: relative; top: -4px; } #product-area-search .restallsectioncat.actionbtn {margin-bottom: 5px;} #product-area-search .restallsectioncat.newtags span.clsPrice img.clsStoreImg { background:#E38313; width:20px;padding: 3px;border-radius: 2px;margin-right: 5px;} #product-area-search .clsSearchPg .clsContent .clsProd { margin:10px; border-right:1px solid #eee; } #product-area-search .searchtabsforallcat { padding: 0 20px; } #product-area-search .searchtabsforallcat ul { padding:0; margin:0; list-style:none; display:flex; } #product-area-search .searchtabsforallcat ul li { padding:7px 20px; border: 1px solid #E4E4E4; border-radius: 4px; margin: 0px 10px; font-weight:500; color:#333; font-size:14px; cursor:pointer; } header .clsSearchBox .clsSearchBtn.resetbtn { background: transparent; color: #000 !important; width: auto; text-decoration: underline; height:auto !important; } #product-area-search a.clsProdAdd { color: #fff !important; } #product-area-search ul.childfilter.scrollablefilter { max-height: 150px; overflow-y: scroll; } #product-area-search .searchtabsforallcat ul li.active { background: #28A745 0% 0% no-repeat padding-box; color:#fff; } #product-area-search p.sectiontag { position:absolute; left:10px; top:10px; border-radius: 2px; font-size:12px; letter-spacing: 0px; color: #FFFFFF; padding:5px 10px; font-weight:500; } #product-area-search p.sectiontag.sectiongrocery { background: #F7BE00 0% 0% no-repeat padding-box; } #product-area-search span.clsTitle.storemyicon { font-size: 12px; color: #707070; } #product-area-search span.clsTitle.storemyicon img { width: 15px; margin-right: 7px; position: relative; top: 3px; } #product-area-search p.sectiontag.sectionrestaurent { background: #EA3F3F 0% 0% no-repeat padding-box; } #product-area-search p.sectiontag.sectionmealkit { background: #ED850C 0% 0% no-repeat padding-box; } #product-area-search p.sectiontag.alcoholkit { background: #ED1E25 0% 0% no-repeat padding-box; } #product-area-search .maincatheadtitle > h3{ font-size: 17px; font-weight: 500; color: #000; } #product-area-search .maincatheadtitle > h3 span { font-size: 17px; font-weight: 600; color: #000; } #product-area-search .mainpp:after { content: '' !important; } .clsContent.no-result-found { display: block; } @media only screen and (min-width: 320px) and (max-width: 600px) { #product-area-search .searchtabsforallcat ul li { padding: 11px 13px; border: 1px solid #E4E4E4; border-radius: 4px; margin: 0px 3px; font-weight: 500; color: #333; font-size: 12px; line-height: 14px; } } #product-area-search div#filterresult { padding: 0px 20px; } .showallfilterwrap .leftalignfilter {float:left; } .showallfilterwrap .rightalignfilter {float:right; width:180px; } li.mainpp > label > span >img { margin-left: 10px; } div#mySidenav ul li { display: inline-block; width: 100%; margin: 0px 0px; position: relative; } .sidenav { padding-top:39px; } #product-area-search ul.childfilter.scrollablefilter { margin-right: 11px; } #product-area-search li.mainpp > label { color: #000 !important; display: block; } #product-area-search li.mainpp > label > span { color: #000 !important; font-weight:500; display: block; } #product-area-search ul.tplink { border-bottom: 1px solid #fff; /* border-top: 1px solid #f0f0f0; */ padding: 10px 10px !important; } #product-area-search ul.childfilter{ display:none; } #product-area-search ul.pactive ul.childfilter { display: block; position: absolute; /* background: #fff; */ z-index: 9; /* border: 1px solid #eaeaea; */ /* padding: 15px; */ background: #FFFFFF 0% 0% no-repeat padding-box; box-shadow: 0px 3px 6px #00000029; border: 1px solid #E4E4E4; border-radius: 4px; opacity: 1; padding: 12px 15px; margin-top: 7px; width: 180px; } #product-area-search ul.childfilter li { margin-bottom: 7px; } .showallfilterwrap .rightalignfilter li.mainpp { text-align: right; } #product-area-search ul.tplink.pactive { position: relative; } #product-area-search ul.childfilter li label span { color: #000; font-size: 12px !important; font-weight: 500; margin-left: 7px; } #product-area-search .mainpp { position:relative;} .showallfilterwrap ul { list-style: none; } .showallfilterwrap { clear: both; } .filterbutton { box-shadow: 0px 0px 4px #ccc; margin: 0px; padding: 8px 20px; text-align: right; position: relative; top: 6px; } input#filterrestaurants { text-align: center; display: inline-block; text-decoration: none; background-color: var(--primary-color); border: none; padding: 7px 12px; color: #fff; border-radius: 5px; outline: none; cursor: pointer; transition: 0.2s ease-out; font-weight: 500; font-size: 12px; } div#mySidenav input#Reset { border: 1px solid #666; background: #fff; box-shadow: none; padding: 7px 12px; border-radius: 5px; font-weight: 500; font-size: 12px; } .product-filter-buttons-container { display: inline-block; width: 90%; margin-bottom: 0px; margin-top: 15px; padding: 6px 20px; } ul.childfilter li label span { font-size: 12px; } #product-area-search .maincatheadtitle { text-align: left; width: 100%; display: block; padding: 0 5px; /* border-bottom: 1px solid; */ margin: 25px auto 10px auto; } #product-area-search .maincatheadtitle h3 { font-size: 17px; font-weight: 600; border-bottom: 1px solid #fff; padding-bottom: 0px; } #product-area-search .current-filters > li > a { margin-left: 10px; font-size: 14px; font-weight: 600; } #product-area-search .current-filters > li { border: 1px solid rgba(147,163,172,.2); background: #fff; color: #000; padding: 2px 4px; font-size: 12px; font-weight: 500; float: left; margin-right: 10px; } div#prod-bottom-loader-search { text-align: center; } #product-area-search .clear-current-filters { font-size: 12px; font-weight: 600; font-family: 'Montserrat', sans-serif; padding: 4px; color: var(--primary-color); text-transform: uppercase; cursor: pointer; display:inline; float:left; } div#load_data p.noresultfound,#product-area p.noresultfound { text-align: center; margin-bottom: 50px; font-weight: 500; } #product-area p.noresultfound { margin-top: 50px; } .no-result-found-msg p { text-align: center; font-weight: 500; color: #000; } .no-result-found-msg { margin-top: 15px; } .product-filter-buttons-container { display: inline-block; width: 100%; margin-bottom: 0px; margin-top: 0px; padding: 6px 25px; } .clsSearchPg{ margin-top:20px; margin-bottom:30px; } .cancelfiltersearch { cursor: pointer; display: none; } @media screen and (max-width: 767px){ header .clsSearchBox input[type=text] { width: 85%; } header .clsSearchBox .clsSearchBtn { right: 57px !important; } header .clsSearchBox .clsSearchBtn.crossbtn { right: 6px !important; } div#product-area-search { margin-top: 50px; } #product-area-search .clsSearchPg { clear: both; padding: 0px 5px; } .showallfilterwrap .rightalignfilter { float: right; width: auto; } #product-area-search ul.tplink { padding: 8px 6px !important; } li.mainpp > label > span >img { margin-left: 5px; } #product-area-search li.mainpp > label > span { font-size: 12px; } .sortbywrap.rightalignfilter.allpp.active ul.childfilter { right:0px; } #product-area-search .clsProd .clsTitle { padding: 0 10px; height: 17px; } #product-area-search .clsSearchPg .clsContent .clsProd { margin: 5px; } #product-area-search .product-filter-buttons-container { padding: 6px 5px; } maincatheadtitle h3 { font-size: 13px; } } @media only screen and (max-width: 1100px) and (min-width: 768px) { header .clsSearchBox input[type=text] { width: 85%; } header .clsSearchBox .clsSearchBtn { right: 70px !important; } header .clsSearchBox .clsSearchBtn.crossbtn { right: 6px !important; } div#product-area-search { margin-top: 50px; } } @media only screen and (max-width: 1350px) and (min-width: 1101px) { header .clsSearchBox input[type=text] { width: 90%; } header .clsSearchBox .clsSearchBtn.crossbtn { right: -2px; } } </style> <div class="showallfilterwrap"> <input type="hidden" id="tempq"> <input type="hidden" id="tempseaechid"> <form id="searchrestform"> <div id="finalsectionhtml" class="productsection leftalignfilter allpp"> </div> <div id="finalstorelisthtml" class="newstore leftalignfilter allpp"> </div> </form> </div> <div id="product-filter-buttons-container" class="product-filter-buttons-container" style="display:none;"> <!-- Product Filter list --> <ul class="current-filters"> <!-- Product Filter Attributes --> </ul> </div> <input type="hidden" id="vstart" value="0"> <input type="hidden" id="vlimit" value="1"> <script type="text/javascript"> $(document).ready(function () { var timer; show_loader = false; vaction = 'active'; vstart=0; vlimit=1; $("#search_drop").hide(); $(".showallfilterwrap").hide(); //$("#search_box").hide(); $("#search_box").on('keyup', function(){ $('#tempq').val(); $('#tempseaechid').val(); var search_string = $("#search_box").val(); search_string=search_string.replace(/(<([^>]+)>)/gi, ""); search_string=$.trim(search_string); if (search_string == '') { $('#load_data_search').html(''); $('#searchhide').show(); $('#product-area-search .maincatheadtitle h3').html(''); $('#product-area-search .showallfilterwrap').hide(); $('#search_drop').hide(); $(".left.slick-arrow").trigger('click'); } else { if($(this).val().length < $(this).attr('minlength')){ $('#product-area-search .maincatheadtitle h3').html(''); $('#product-area-search .showallfilterwrap').hide(); } $('#load_data_search').html(''); $('#searchhide').hide(); $("#search_drop").show(); if($(this).val().length >= $(this).attr('minlength')){ show_loader = false; vaction = 'active'; vstart=0; vlimit=1; var href=""; var sectionid=""; clearTimeout(timer); // clear timer timer = setTimeout(function() { removeSearchFilter(0); }, 500); document.cookie = "searchpath" + "=" + href + ";" + "path=/"; document.cookie = "searchsectionid" + "=" + sectionid + ";" + "path=/" }else { $("#search_drop").hide(); $('#searchhide').show(); } } }); $('#search_box').on('keydown', function () { clearTimeout(timer); }); $('#headersearchfrm input').keydown(function (e) { if (e.keyCode == 13) { e.preventDefault(); return false; } }); }); function filtersearchdata(vstart,vlimit,reset) { $("#prod-bottom-loader-search").show(); $('.allpp.active').find('.pactive').removeClass("pactive"); $('.allpp.active').find('.active').removeClass("active"); $('.allpp.active').removeClass("active"); if(reset==1 || reset==2){ show_loader = false; vaction = 'active'; vstart=0; vlimit=1; $("#vstart").val(vstart) } if(reset==2) { var searchid=0; } else { var searchid=$("#ttsearchid").val(); } if(searchid=='' || searchid==null){ if($("#tempseaechid").val()>0){ var searchid=$("#tempseaechid").val(); } else { var searchid=0; } } var arrsection=[]; $.each($("input[name='section[]']:checked"), function(){ var pid=$(this).val(); var name=$(this).data('bname'); arrsection.push({[pid] : name}); }); var arrdiscount=[]; var filterdiscountslug=[]; $.each($("input[name='discounts[]']:checked"), function(){ var pid=$(this).val(); var name=$(this).data('bname'); var discountid=$(this).data('discountid'); filterdiscountslug.push(discountid); arrdiscount.push({[pid] : name}); }); var arrstores=[]; $.each($("input[name='stores[]']:checked"), function(){ var pid=$(this).val(); pid=$.trim(pid); var name=$(this).data('bname'); arrstores.push({[pid] : name}); }); var sortby=$("input[type='radio'][name='sortbys']:checked").val(); //$('.product-filter-buttons-container').html(""); if(arrstores.length > 0 || arrsection.length > 0 || arrdiscount.length > 0 || sortby) { $('#product-filter-buttons-container').show(); var activefilterhtml=''; activefilterhtml='<ul class="current-filters">'; for(var key in arrstores) { var objstore=arrstores[key]; for (let KEY in objstore){ KEY=$.trim(KEY); activefilterhtml+='<li class="storelistdd" data-sidfilter="'+ KEY +'">'+ objstore[KEY] +'<a href="javascript:void(0)" data-filterobjectid="'+ KEY +'" onclick=removeSearchFilter("'+KEY+'")>x</a></li>'; } } for(var key in arrsection) { var objbrand=arrsection[key]; for (let KEY in objbrand){ activefilterhtml+='<li>'+ objbrand[KEY] +'<a href="javascript:void(0)" data-filterobjectid="'+ KEY +'" onclick=removeSearchFilter("'+KEY+'")>x</a></li>'; } } for(var key in arrdiscount) { var objdiscount=arrdiscount[key]; for (let KEY in objdiscount){ activefilterhtml+='<li>'+ objdiscount[KEY] +'<a href="javascript:void(0)" data-filterobjectid="'+ KEY +'" onclick=removeSearchFilter("'+KEY+'")>x</a></li>'; } } var filtersortby=null; if(sortby){ var sortbylable=$("input[type='radio'][name='sortbys']:checked").data('bname'); filtersortby=$("input[type='radio'][name='sortbys']:checked").data('rowid'); activefilterhtml+='<li>'+ sortbylable +'<a href="javascript:void(0)" data-filterobjectid="'+ sortby +'" onclick=removeSearchFilter("'+ sortby +'")>x</a></li>'; } var all=0; if(arrstores.length > 0 || arrsection.length > 0 || arrdiscount.length>0){ activefilterhtml+='<div class="clear-current-filters" onclick="removeSearchFilter('+ all +')">Clear Filters</div>'; } activefilterhtml+='</ul>'; $('#product-filter-buttons-container').html(activefilterhtml); } else { $('#product-filter-buttons-container').hide(); $('#product-filter-buttons-container').html(''); } var apitokensearch=$("#apitokensearch").val(); var value_user_id=$("#value_user_id").val(); var postalcode=$("#postalcode").val(); var search_string = $("#search_box").val(); if(search_string==''){ search_string=$("#tempq").val() } var filterstore = jQuery.map($(':checkbox[name=stores\\[\\]]:checked'), function (n, i) { return n.value.replace('store',''); }).join(','); var filtersection = jQuery.map($(':checkbox[name=section\\[\\]]:checked'), function (n, i) { return n.value.replace('section',''); }).join(','); var filterdiscount = jQuery.map($(':checkbox[name=discounts\\[\\]]:checked'), function (n, i) { return n.value.replace('discount',''); }).join(','); var sortby=$("input[type='radio'][name='sortbys']:checked").val(); if(searchid>=0){ load_search_data(vstart,vlimit,search_string,filterstore,filtersection,filterdiscount,sortby,searchid,reset,apitokensearch,value_user_id,postalcode); } } //search function on second click /*function searchit(){ var timesClicked = 0; $("#searchbtn").click(function() { timesClicked++; if (timesClicked>0) { $('#headersearchfrm').submit(); } else { //run first function } }) }*/ //search function on second click function searchit() { //if($(this).val().length > $(this).attr('minlength')){ // $('#headersearchfrm').submit(); // } } $("#searchbtn").on("click", function() { var oldq=$('input#search_box').val(); $('input#tempq').val(oldq); $('input#search_box').val(''); $("#searchdeact").show(); $("#searchbtn").hide(); $("#searchbtn").removeClass('resetbtn'); }); $("#searchcrossbtn").on("click", function() { $('input#search_box').val(''); $("#searchdeact").show(); $("#searchbtn").hide(); $("#searchbtn").removeClass('resetbtn'); $("#search_drop").hide(); $("#searchhide").show(); $("#searchcrossbtn").hide(); $(".left.slick-arrow").trigger('click'); var ssid=0; var href=""; var sectionid=""; document.cookie = "searchid" + "=" + ssid + ";" + "path=/"; document.cookie = "searchpath" + "=" + href + ";" + "path=/"; document.cookie = "searchsectionid" + "=" + sectionid + ";" + "path=/"; }); </script> <script> $(document).ready(function () { $('input#search_box').on('keyup', function () { var charCount = $(this).val().replace(/\s/g, '').length; if (charCount >= 2) { $("#searchdeact").hide(); $("#searchbtn").show(); $("#searchbtn").addClass('resetbtn'); $("#searchcrossbtn").show(); $(".resetbtn").text('Reset'); $("#whatsget").removeAttr("disabled"); } if (charCount < 2) { $("#searchdeact").show(); $("#searchbtn").hide(); $("#searchbtn").removeClass('resetbtn'); $("#searchcrossbtn").hide(); } }); }); </script> <script> $(document).on("click", "#searchrestform .mainpp", function () { if ($(this).parents('.allpp').hasClass("active")) { $(this).parents('.allpp').removeClass("active"); $(this).parents('.allpp').find('.pactive').removeClass("pactive"); $(this).parents('.allpp').find('.active').removeClass("active"); $('.allpp.active').find('.pactive').removeClass("pactive"); $('.allpp.active').find('.active').removeClass("active"); $('.allpp.active').removeClass("active"); } else { $('.allpp.active').find('.pactive').removeClass("pactive"); $('.allpp.active').find('.active').removeClass("active"); $('.allpp.active').removeClass("active"); $(this).parents('.allpp').toggleClass("active"); $(this).parent().toggleClass("pactive"); $(this).toggleClass("active"); } }); $(document).on("click", ".clicksavepath", function () { var href = $(this).attr('href'); var sectionid = $(this).attr('data-sectionid'); document.cookie = "searchpath" + "=" + href + ";" + "path=/"; document.cookie = "searchsectionid" + "=" + sectionid + ";" + "path=/"; }) var vshow_loader = true; var ajaxReq = 'ToCancelPrevReq'; function load_search_data(vstart, vlimit, search_string, filterstore, filtersection, filterdiscount, sortby,searchid,reset,apitokensearch,value_user_id,postalcode) { if(vstart==0) { $('#load_data_search').html(''); } ajaxReq=$.ajax({ url: "ajax-search-new.php", //method: "POST", data: {limit: vlimit, start: vstart, q: search_string,filterstore: filterstore,filtercategory:filtersection,filterdiscount:filterdiscount,filtersortby:sortby,searchid:searchid,apitokensearch:apitokensearch,value_user_id:value_user_id,postalcode:postalcode}, cache: false, async: true, beforeSend : function() { if(ajaxReq != 'ToCancelPrevReq' && ajaxReq.readyState < 4 && reset==1) { $("#tempseaechid").val(searchid); ajaxReq.abort(); } }, success: function (data) { if (data.trim() == 'false') { vshow_loader = false; vaction = 'active'; if(vstart==0){ $('#load_data_search').html(''); } } else { if(vstart==0){ $('#load_data_search').html(data); } else { $('#load_data_search').append(data); } vaction = "inactive"; vshow_loader = true; $("#prod-bottom-loader-search").show(); lazyload(); } $("#prod-loader").hide(); if(vstart==0){ vstart=0; vlimit=0; var ttproductcount=$('#ttproductcount').val(); if(ttproductcount >0 && data.trim() != 'false'){ $('#finalsectionhtml').html($('#sectionlisthtml').html()); $('#finalstorelisthtml').html($('#storelisthtml').html()); $('#storelisthtml').html(''); $('.storelistdd').each(function(i, obj) { var sid=$(this).data('sidfilter'); $('input:checkbox[value="'+sid+'"]').prop("checked",true); }); $('#product-area-search .maincatheadtitle').html('<h3>'+ttproductcount+' products found for <span>'+search_string+'</span></h3>'); $(".showallfilterwrap").show(); } else { $('#product-area-search .maincatheadtitle').html('<h3>No result found for <span>'+search_string+'</span></h3>'); $(".showallfilterwrap").hide(); } } <?php if(basename($_SERVER['SCRIPT_NAME'])!='review-order.php' ){?>restoreProdQty();<?php } ?> // console.log("data",data, show_loader); $(window).scroll(bindScrollSearch); $("#prod-bottom-loader-search").hide(); }, error: function (jqXHR, exception) { var msg = ''; if (jqXHR.status === 0) { $(".showallfilterwrap").hide(); $("#prod-bottom-loader-search").hide(); } else if (jqXHR.status == 404) { msg = 'Requested page not found. [404]'; } else if (jqXHR.status == 500) { $("#prod-bottom-loader-search").hide(); } else if (exception === 'parsererror') { $("#prod-bottom-loader-search").hide(); } else if (exception === 'timeout') { $("#prod-bottom-loader-search").hide(); } else if (exception === 'abort') { } else { $("#prod-bottom-loader-search").hide(); } $("#prod-bottom-loader-search").hide(); } }); } function loadMoreSearchData() { vaction = 'active'; vstart=parseInt($("#vstart").val()); vlimit=parseInt($("#vlimit").val()); vstart = parseInt(vstart) + parseInt(vlimit); $("#vstart").val(vstart) $("#prod-bottom-loader-search").show(); var search_string = $("#search_box").val(); filtersearchdata(vstart, vlimit); $(window).bind('scroll', bindScrollSearch); } function bindScrollSearch() { if($(window).width()>768){ var scrollheight=1900; }else{ var scrollheight=2100; } if ($(window).scrollTop() + $(window).height() > $(document).height() - scrollheight && vaction == 'inactive' && vshow_loader == true) { $(window).unbind('scroll'); loadMoreSearchData(); } } function removeSearchFilter(val) { $("#prod-bottom-loader-search").show(); vstart=0; vlimit=1; if(val==0){ $('form#searchrestform').trigger("reset"); //$('input:checkbox').removeAttr('checked'); //$('input:radio').removeAttr('checked'); filtersearchdata(vstart,vlimit,2); window.scrollTo({top: 0}); $('#product-filter-buttons-container').html(''); } else { $('input:checkbox[value="'+val+'"]').prop("checked",false); $('input:radio[value="'+val+'"]').prop("checked",false); filtersearchdata(vstart,vlimit,1); } } function SearchInputValidation(e) { var specialKeys = new Array(); specialKeys.push(8); //Backspace specialKeys.push(9); //Tab specialKeys.push(46); //Delete specialKeys.push(36); //Home specialKeys.push(35); //End specialKeys.push(37); //Left specialKeys.push(39); //Right var search_string = $("#search_box").val(); var keyCode = e.keyCode == 0 ? e.charCode : e.keyCode; if (keyCode === 32 && !search_string) { return false; } else { var ret = ((keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || keyCode == 32 || (keyCode >= 97 && keyCode <= 122) || (specialKeys.indexOf(e.keyCode) != -1 && e.charCode != e.keyCode) || keyCode==13); return ret; } } $(document).on('click', function (e) { if ($(e.target).closest(".mainpp").length ==0) { if ($(e.target).closest(".childfilter").length === 0) { $('.allpp').removeClass("active"); $('.mainppp').removeClass("pactive"); $('.mainpp').removeClass("active"); } } }); </script>