$(document).ready(function () { $('.postabbing li a').click(function (e) { e.preventDefault(); var fid = $(this).attr('href'); var fidclass = $(this).attr('href').replace('#', ''); if ($(fid).is(':visible')) { $(fid).slideDown('slow'); $('.'+fidclass).slideDown('slow'); //$(this).parent().removeClass('active'); } else { $('.postabbing li').removeClass('active'); $('.postabcont').slideUp('slow'); $('.pf_datacontainer').slideUp('slow'); $(this).parent().toggleClass('active'); $(fid).slideDown('slow'); $('.'+fidclass).slideDown('slow'); } }); if(window.location.hash == '#livesec'){ $('html, body').animate({scrollTop: $("#pctabing").offset().top-120}, 2000); } else if(window.location.hash == '#onlinesec'){ $('html, body').animate({scrollTop: $("#pctabing").offset().top-120}, 2000); jQuery('.postabbing li a').trigger('click'); } /* seminarsec js start ---------------------------*/ $('.semclick').click(function(e){ // debugger; var _this = $(this); var wwidth = $(window).width(); e.preventDefault(); semiconthtml = $(this).next().html(); var headerH = $('header').height()+10; semclick = $(_this); // Added new lines on 05-11-2019 if($(_this).closest('.sfwidth').children('.sfcont').length > 0){ $(_this).closest('.sfwidth').children('.sfcont').remove(); } var sfcontHTML = '
'; if($(_this).closest('.sfwidth').next('.sfcont').length == 0){ $(sfcontHTML).insertAfter($(_this).closest('.sfwidth')); } if(wwidth >767){ $('.sfcont').fadeOut(); if($(_this).hasClass('active')){ $(_this).closest('.sfwidth').next('.sfcont').fadeOut('slow'); $(_this).removeClass('active'); } else { $('.semclick').removeClass('active'); $('.sfwidth').removeClass('active'); $(_this).closest('.sfwidth').addClass('active'); $(_this).addClass('active'); $(_this).closest('.sfwidth.active').next('.sfcont').html('
'+semiconthtml+'
').fadeIn('slow', function(){ $('body,html').animate({ scrollTop: $(_this).closest('.sfwidth').offset().top - headerH }, 700); }); } } else if(wwidth <767 && wwidth > 360){ $('body,html').animate({ scrollTop: $(_this).closest('.shalfwidth').offset().top - 70 }, 700); if($(_this).hasClass('active')){ $(_this).closest('.shalfwidth').children('.shalfcont').fadeOut('slow'); $(_this).removeClass('active'); } else { $('.semclick').removeClass('active'); $('.shalfwidth').removeClass('active'); $(_this).closest('.shalfwidth').addClass('active'); $(_this).addClass('active'); $('.shalfcont').fadeOut('slow', function(){ $(_this).closest('.shalfwidth.active').children('.shalfcont').html('
'+semiconthtml+'
').fadeIn('slow'); }); } } else { $('.sfcont').html('
'); $('.shalfcont').html('
'); $('body,html').animate({ scrollTop: $(semclick).offset().top }, 700); if($(semclick).hasClass('active')){ $(semclick).parent().children('.seminarcont').fadeOut('slow'); $(semclick).removeClass('active'); } else { $('.semclick').removeClass('active'); $(semclick).addClass('active'); $('.seminarcont').fadeOut('slow'); $(semclick).parent().children('.seminarcont').fadeIn('slow'); } } }); /* seminarsec js end -----------------------------*/ }); $(window).resize(function () { var wwidth = $(window).width(); $('.sfcont .sfcontbase,.shalfcont .shalfcontbase').html(''); $('.sfcont,.shalfcont,.seminarcont').removeAttr('style'); $('.semclick,.shalfwidth,.sfwidth').removeClass('active'); });