');},success: function(response) {$('.megamenuthird[data-menu=' + $data_megamenu + '-articles]').html(response);},error: function(xhr) { // if error occured$('.megamenuthird[data-menu=' + $data_megamenu + '-articles]').html("Error occured.please try again"); }});}}//Child Level Menu Hoverfunction get_childlevelmenu(currentid){//console.log('current id '+currentid);var $currentelement = $('#'+currentid);$('.menu-item-'+$('#'+currentid).closest('.themegamenu').attr('cid').split('-')[3]).removeClass('defaultajax-1');var $data_menu = $('#'+currentid).closest('li').data('menu');var ajaxreplaceContent = $('#'+currentid).closest('.themegamenu').data('megamenu')+'-articles';var submenu = $data_menu.split('-');var data_menu_class=submenu[0];//$('.megamenuthird').empty();$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').empty();$('li.level_2').removeClass('activeli');$currentelement.closest('li').siblings().removeClass('activeli');$currentelement.closest('li').addClass('activeli');var current_megamenu_second = $('.megamenusecond[data-menu='+$data_menu+']').length;$('.megamenuopen .megamenusecond').removeClass('megamenusecond-show');//$currentelement.closest('li').find('.megamenuopen .megamenusecond').removeClass('megamenusecond-show');$('.megamenusecond[data-menu=' + $data_menu + ']').addClass('megamenusecond-show');//if(current_megamenu_seconda').html();/********* End level3 checking menu ********/// checking 4th level menu /*** 4th level Objec code here **///getting parent data-menuvar levelfour_data_menu = $('.megamenusecond[data-menu='+$data_menu+']').find('li.level_3.activeli').data('menu');// End getting parent data-menuvar subofSubChildLevel_cat_id = $('.megamenusecond[data-menu='+levelfour_data_menu+']').find('li.level_4.activeli').data('cat');var subofSubChildLevel_data_menu = $('.megamenusecond[data-menu='+levelfour_data_menu+']').find('li.level_4.activeli').data('menu');var subofSubChildLevel_taxnomy_type= $('.megamenusecond[data-menu='+levelfour_data_menu+']').find('li.level_4.activeli').data('type');var subofSubChildLevel_title = $('.megamenusecond[data-menu='+levelfour_data_menu+']').find('li.level_4.activeli> a').html();if(subofSubChildLevel_title!=''){var ajx_title=subofSubChildLevel_title;}else{var ajx_title=subChildLevel_title;}/*** End 4th level Objec code here **/if(subofSubChildLevel_cat_id!=''){var data_obj ={'title':ajx_title,'subofSubChildLevel_cat_id':subofSubChildLevel_cat_id,'subofSubChildLevel_taxnomy_type':subofSubChildLevel_taxnomy_type,'subChildLevel_cat_id': subChildLevel_cat_id,'subChildLevel_taxnomy_type' :subChildLevel_taxnomy_type,'ChildLevel_data_type':ChildLevel_data_type,'ChildLevel_data_cat_id':ChildLevel_data_cat_id,'parent_data_cat_id':parent_data_cat_id,'parent_data_type':parent_data_type};}else{var data_obj ={'title':ajx_title,'subChildLevel_cat_id': subChildLevel_cat_id,'subChildLevel_taxnomy_type' :subChildLevel_taxnomy_type,'ChildLevel_data_type':ChildLevel_data_type,'ChildLevel_data_cat_id':ChildLevel_data_cat_id,'parent_data_cat_id':parent_data_cat_id,'parent_data_type':parent_data_type};}} if( ajaxRequestProject != null ) {ajaxRequestProject.abort();ajaxRequestProject = null;}ajaxRequestProject = $.ajax({type: 'POST',url: 'https://www.pharmaceutical-business-review.com/wp-admin/admin-ajax.php?action=mega_posts',data: data_obj, dataType: "html",beforeSend: function() {$('.megamenuthird[data-menu=' + ajaxreplaceContent+ ']').html('');},success: function(response) {$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html(response);},error: function(xhr) { // if error occured$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html("Error occured.please try again");}});}//Subchild Level Menu Hover//Child Level Menu Hoverfunction get_subchildlevelmenu(currentid){var $currentelement = $('#'+currentid);$('.menu-item-'+$('#'+currentid).closest('.themegamenu').attr('cid').split('-')[3]).removeClass('defaultajax-1');var $data_menu = $currentelement.closest('li').attr('data-menu'); var submenu = $data_menu.split('-'); var data_menu_class=submenu[0];var ajaxreplaceContent = $('#'+currentid).closest('.themegamenu').data('megamenu')+'-articles';$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').empty();$('.megamenuthird').removeClass('megamenuthird-show');$('.megamenuthird[data-menu=' + $data_menu + ']').addClass('megamenuthird-show');$('li.level_3').removeClass('activeli');$currentelement.closest('li').addClass('activeli');var subChildLevel_title = $currentelement.html();//last child level$currentelement.closest('li').parent().closest('li').find('.megamenusecond-new[data-menu=' + $data_menu + ']').find('li.level_4').removeClass('activeli');var $data_menu = $('#'+currentid).closest('li').data('menu');$('.megamenuopen .megamenusecond-new').removeClass('megamenusecond-show');$currentelement.closest('li').parent().closest('li').find('.megamenusecond-new[data-menu=' + $data_menu + ']').addClass('megamenusecond-show');$currentelement.closest('li').parent().closest('li').find('.megamenusecond-new[data-menu=' + $data_menu + ']').find('li.level_4:first-child').addClass('activeli');//console.log('subchild-'+title);var subChildLevel_cat_id=$currentelement.closest('li').data("cat");var subChildLevel_taxnomy_type = $currentelement.closest('li').data("type");var ChildLevel_data_type= $(".mega-options > li.project_m.activeli").data("type");var ChildLevel_data_cat_id= $(".mega-options > li.project_m.activeli").data("cat_id");var parent_data_cat_id= $currentelement.closest('.themegamenu').data("main_cat_id");var parent_data_type= $currentelement.closest('.themegamenu').data("main_type");// checking 4th level menu /*** 4th level Objec code here **/// End getting parent data-menuif($('.megamenusecond.megamenusecond-new').length > 0){var subofSubChildLevel_cat_id = $('.megamenusecond[data-menu='+$data_menu+']').find('li.level_4.activeli').data('cat');var subofSubChildLevel_data_menu = $('.megamenusecond[data-menu='+$data_menu+']').find('li.level_4.activeli').data('menu');var subofSubChildLevel_taxnomy_type= $('.megamenusecond[data-menu='+$data_menu+']').find('li.level_4.activeli').data('type');var subofSubChildLevel_title = $('.megamenusecond[data-menu='+$data_menu+']').find('li.level_4.activeli> a').html();if(subofSubChildLevel_title!==''){var ajx_title=subofSubChildLevel_title;}else{var ajx_title=subChildLevel_title;}if(subofSubChildLevel_cat_id!=''){var data_obj= {'title':ajx_title,'subofSubChildLevel_cat_id':subofSubChildLevel_cat_id,'subofSubChildLevel_taxnomy_type':subofSubChildLevel_taxnomy_type,'subChildLevel_cat_id': subChildLevel_cat_id,'subChildLevel_taxnomy_type' :subChildLevel_taxnomy_type,'ChildLevel_data_type':ChildLevel_data_type,'ChildLevel_data_cat_id':ChildLevel_data_cat_id,'parent_data_cat_id':parent_data_cat_id,'parent_data_type':parent_data_type};}else{var data_obj= {'title':ajx_title,'subChildLevel_cat_id': subChildLevel_cat_id,'subChildLevel_taxnomy_type' :subChildLevel_taxnomy_type,'ChildLevel_data_type':ChildLevel_data_type,'ChildLevel_data_cat_id':ChildLevel_data_cat_id,'parent_data_cat_id':parent_data_cat_id,'parent_data_type':parent_data_type};}}else{var data_obj= {'title':subChildLevel_title,'subChildLevel_cat_id': subChildLevel_cat_id,'subChildLevel_taxnomy_type' :subChildLevel_taxnomy_type,'ChildLevel_data_type':ChildLevel_data_type,'ChildLevel_data_cat_id':ChildLevel_data_cat_id,'parent_data_cat_id':parent_data_cat_id,'parent_data_type':parent_data_type};} if( ajaxRequestProject != null ) {ajaxRequestProject.abort();ajaxRequestProject = null;}ajaxRequestProject = $.ajax({ type: 'POST', url: 'https://www.pharmaceutical-business-review.com/wp-admin/admin-ajax.php?action=mega_posts', dataType: "html", data: data_obj, beforeSend: function() {$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html('');},success: function(response) {$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html(response);},error: function(xhr) { // if error occured$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html("Error occured.please try again"); }});}//last child levelfunction get_lastchildlevelmenu(currentid){var $currentelement = $('#'+currentid);$('.menu-item-'+$('#'+currentid).closest('.themegamenu').attr('cid').split('-')[3]).removeClass('defaultajax-1');var $data_menu = $currentelement.closest('li').attr('data-menu'); var submenu = $data_menu.split('-'); var data_menu_class=submenu[0];var $ajax_data_menu = $currentelement.closest('li').attr('data-ajax'); var ajax_submenu = $ajax_data_menu.split('-'); var ajax_data_menu_class=ajax_submenu[0]+'-'+ajax_submenu[1];var ajaxreplaceContent = $('#'+currentid).closest('.themegamenu').data('megamenu')+'-articles';$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').empty();$('.megamenuthird').removeClass('megamenuthird-show');$('.megamenuthird[data-menu=' + $data_menu + ']').addClass('megamenuthird-show');$('li.level_4').removeClass('activeli');$currentelement.closest('li').addClass('activeli');var title = $currentelement.html();var subofSubChildLevel_cat_id=$currentelement.closest('li').data("cat");var subofSubChildLevel_taxnomy_type = $currentelement.closest('li').data("type");var subofSubChildLevel_title = $currentelement.closest('li').find('li.level_4.activeli> a').html();var subChildLevel_cat_id=$('.megamenusecond[data-menu='+ajax_data_menu_class+']').find('li.level_3.activeli').data('cat');var subChildLevel_data_menu=$('.megamenusecond[data-menu='+ajax_data_menu_class+']').find('li.level_3.activeli').data('menu');var subChildLevel_taxnomy_type = $('.megamenusecond[data-menu='+ajax_data_menu_class+']').find('li.level_3.activeli').data('type');var ChildLevel_data_type= $(".mega-options > li.project_m.activeli").data("type");var ChildLevel_data_cat_id= $(".mega-options > li.project_m.activeli").data("cat_id");var parent_data_cat_id= $currentelement.closest('.themegamenu').data("main_cat_id");var parent_data_type= $currentelement.closest('.themegamenu').data("main_type");var data_obj= {'title':title,'subofSubChildLevel_cat_id':subofSubChildLevel_cat_id,'subofSubChildLevel_taxnomy_type':subofSubChildLevel_taxnomy_type,'subChildLevel_cat_id': subChildLevel_cat_id,'subChildLevel_taxnomy_type' :subChildLevel_taxnomy_type,'ChildLevel_data_type':ChildLevel_data_type,'ChildLevel_data_cat_id':ChildLevel_data_cat_id,'parent_data_cat_id':parent_data_cat_id,'parent_data_type':parent_data_type};if( ajaxRequestProject != null ) {ajaxRequestProject.abort();ajaxRequestProject = null;}ajaxRequestProject = $.ajax({ type: 'POST', url: 'https://www.pharmaceutical-business-review.com/wp-admin/admin-ajax.php?action=mega_posts', dataType: "html", data:data_obj, beforeSend: function() {$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html('');},success: function(response) {$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html(response);},error: function(xhr) { // if error occured$('.megamenuthird[data-menu=' + ajaxreplaceContent + ']').html("Error occured.please try again"); }});} $(document).ready(function(){//$('body').addClass('loaded');/********* End Third Level on over show/hide ****/$('.news-box-big').hover(function() {$(this).closest('.news').children('.big_title').toggleClass("bordertop");});$('.news-box-medium').hover(function() {$(this).closest('.medium_title').children('.tbt').toggleClass("bordertop");}); /********* Newsletter onclick events start here *******/ $(".header-cta a").click(function(e){ var $elem = $('.newsletter-box').position(); $('html,body').animate({ scrollTop: $(".newsletter-box").offset().top - 80}, 'fast'); }); /***** Newsletter onclick events End here *******/ /* Close guided tour */ $(".close-guided-tour").click(function(){$(".home_timeline").hide(); }); /* Close guided tour */ $(".close-guided-tour2").click(function(){ $(".timeline-tour2").hide(); }); /* $( ".fa-search" ).click(function() { $( 'body' ).toggleClass('search-open'); //$('.search-form').toggle(); }); $('.search-toggle').click(function () {$('.search-form').toggleClass('expanded');}); */ // Search toggle$('.navbar .search-toggle, .mobilesearch').click(function(e){e.preventDefault();$(this).parent().toggleClass('active').find('input[type="search"]').focus();});$('.search-submit').click(function(e){if( $(this).parent().find('.search-field').val() == '' ) {e.preventDefault();$(this).parent().parent().removeClass('active');}}); }); /* Reached newsletter */ $(function(){ $(document).scroll(function(){ if($(this).scrollTop() > = $('.email-capture').offset().top - 50) { $('body').addClass("email-capture-reached"); } else{ $('body').removeClass("email-capture-reached"); } if($(this).scrollTop() > = $('.timeline').offset().top - 50) { $('body').addClass("timeline-tour-open"); } else{ $('body').removeClass("timeline-tour-open"); } }); }); /****** Article page Share n/w ********/ $('.social-toggle').on('click', function() { $(this).next().toggleClass('open-menu'); }); /*** End Article page Share n/w ********/ /* Close guided tour */ $(".close-guided-tour2").click(function(){ $("body").addClass("timeline-closed"); }); /* End Timeline guided tour Track the news */ /* Reached related headline */ $(function(){ $(document).ready(function(){ $('body').addClass("headline-reached"); }); }); /* Reached start */ /*$(function(){ $(document).scroll(function(){ if($(this).scrollTop() > = $('#start').offset().top - 50) { $('body').addClass("start-reached"); } else{ $('body').removeClass("start-reached"); } }); });*/ /* Reached share-content */ $(function(){ $(document).scroll(function(){ if($(this).scrollTop() > = $('.share-content').offset().top - 50) { $('body').addClass("share-content-reached"); } else{ $('body').removeClass("share-content-reached"); } }); }); /* share copy-link section */ function myFunction() { var copyText = document.getElementById("copylink"); copyText.select(); document.execCommand("Copy"); } /* Reached first sidebar mpu */ $(function(){ $(document).scroll(function(){ if($(this).scrollTop() > = $('.mpu1').offset().top - 50) { $('body').addClass("reached-mpu1"); } else{ $('body').removeClass("reached-mpu1"); } }); }); /* Sticky sidebar banner */ /* $(function(){ $(document).scroll(function(){ if ($(window).width() > 1400) { if($(this).scrollTop() > = $('#sticky-mpu').offset().top - 250 ) { $('.sidebar').addClass("banner-fixed"); } else{ $('.sidebar').removeClass("banner-fixed"); } } }); });*/ // Select all links with hashes $('a[href*="#"]') // Remove links that don't actually link to anything .not('[href="#"]') .not('[href="#0"]') .click(function(event) { // On-page links if ( location.pathname.replace(/^//, '') == this.pathname.replace(/^//, '') && location.hostname == this.hostname ) { // Figure out element to scroll to var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); // Does a scroll target exist?
Recent Comments