1jQuery( function ( $ ) { 2 'use strict'; 3 // here for each comment reply link of wordpress 4 $( '.comment-reply-link' ).addClass( 'btn btn-primary' ); 5 6 // here for the submit button of the comment reply form 7 $( '#commentsubmit' ).addClass( 'btn btn-primary' ); 8 9 // The WordPress Default Widgets 10 // Now we'll add some classes for the wordpress default widgets - let's go 11 12 // the search widget 13 $( '.widget_search input.search-field' ).addClass( 'form-control' ); 14 $( '.widget_search input.search-submit' ).addClass( 'btn btn-default' ); 15 $( '.variations_form .variations .value > select' ).addClass( 'form-control' ); 16 $( '.widget_rss ul' ).addClass( 'media-list' ); 17 18 $( '.widget_meta ul, .widget_recent_entries ul, .widget_archive ul, .widget_categories ul, .widget_nav_menu ul, .widget_pages ul, .widget_product_categories ul' ).addClass( 'nav flex-column' ); 19 $( '.widget_meta ul li, .widget_recent_entries ul li, .widget_archive ul li, .widget_categories ul li, .widget_nav_menu ul li, .widget_pages ul li, .widget_product_categories ul li' ).addClass( 'nav-item' ); 20 $( '.widget_meta ul li a, .widget_recent_entries ul li a, .widget_archive ul li a, .widget_categories ul li a, .widget_nav_menu ul li a, .widget_pages ul li a, .widget_product_categories ul li a' ).addClass( 'nav-link' ); 21 22 $( '.widget_recent_comments ul#recentcomments' ).css( 'list-style', 'none').css( 'padding-left', '0' ); 23 $( '.widget_recent_comments ul#recentcomments li' ).css( 'padding', '5px 15px'); 24 25 $( 'table#wp-calendar' ).addClass( 'table table-striped'); 26 27 // Adding Class to contact form 7 form 28 $('.wpcf7-form-control').not(".wpcf7-submit, .wpcf7-acceptance, .wpcf7-file, .wpcf7-radio").addClass('form-control'); 29 $('.wpcf7-submit').addClass('btn btn-primary'); 30 31 // Adding Class to Woocommerce form 32 $('.woocommerce-Input--text, .woocommerce-Input--email, .woocommerce-Input--password').addClass('form-control'); 33 $('.woocommerce-Button.button').addClass('btn btn-primary mt-2').removeClass('button'); 34 35 $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { 36 event.preventDefault(); 37 event.stopPropagation(); 38 $(this).parent().siblings().removeClass('open'); 39 $(this).parent().toggleClass('open'); 40 }); 41 42 // Add Option to add Fullwidth Section 43 function fullWidthSection(){ 44 var screenWidth = $(window).width(); 45 if ($('.entry-content').length) { 46 var leftoffset = $('.entry-content').offset().left; 47 }else{ 48 var leftoffset = 0; 49 } 50 $('.full-bleed-section').css({ 51 'position': 'relative', 52 'left': '-'+leftoffset+'px', 53 'box-sizing': 'border-box', 54 'width': screenWidth, 55 }); 56 }
57 navbarConfig(); 58 fullWidthSection(); 59 $( window ).resize(function() { 60 fullWidthSection(); 61 }); 62 63 // Allow smooth scroll 64 $('.page-scroller').on('click', function (e) { 65 e.preventDefault(); 66 var target = this.hash; 67 var $target = $(target); 68 $('html, body').animate({ 69 'scrollTop': $target.offset().top 70 }, 1000, 'swing'); 71 }); 72 73 //Hide premenu 74 $(window).on("scroll", function() { 75 navbarConfig(); 76 }); 77 78 //Initial configuration 79 $( window ).load(function() { 80 navbarConfig(); 81 }); 82 83 function navbarConfig() { 84 var ColorFrontEnd = { 85 backgroundColor : "rgba(100, 100, 100, 0", 86 color: "rgba(200, 200, 200, 0.8)" 87 } 88 var ColorBlack = { 89 color: "rgba(0, 0, 0, 0.8)" 90 } 91 var ColorsClass = ["bg-primary", "bg-info", "bg-success", "bg-warning", "bg-danger"]; 92 var scrollPos = $(window).scrollTop(); 93 var href = location.pathname + location.search; 94 if(href == "/" || href == "") 95 { 96 if (scrollPos > 0) { 97 $("#navbar").css(ColorBlack); 98 colorMenu(); 99 $("#pre-header").slideUp("slow", function() { 100 }); 101 } else { 102 removeMenu(); 103 $("#navbar").css(ColorFrontEnd); 104 $("#pre-header").slideDown("slow"); 105 } 106 } 107 else 108 { 109 $("#navbar").css(ColorBlack); 110 if (scrollPos > 0) { 111 colorMenu(); 112 $("#pre-header").slideUp("slow", function() { 113 }); 114 } else { 115 removeMenu(); 116 $("#navbar").css('background-color', 'rgba(50, 50, 50, 0.45'); 117 $("#pre-header").slideDown("slow"); 118 } 119 } 120 function removeMenu(){ 121 $("#navbar").removeClass( "bg-primary bg-info bg-success bg-warning bg-danger" ) 122 } 123 function colorMenu(){ 124 removeMenu(); 125 var number = 0; 126 $("#navbar").addClass( ColorsClass[number] ); 127 } 128 } 129 $(document).ready(function(){ 130 $("p").on( "click", navbar2level() ); 131 132 function navbar2level() { 133 134 } 135 136 }); 137 138});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.