12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- jQuery( function ( $ ) {
- 'use strict';
- $( '.comment-reply-link' ).addClass( 'btn btn-primary' );
- $( '#commentsubmit' ).addClass( 'btn btn-primary' );
- $( '.widget_search input.search-field' ).addClass( 'form-control' );
- $( '.widget_search input.search-submit' ).addClass( 'btn btn-default' );
- $( '.variations_form .variations .value > select' ).addClass( 'form-control' );
- $( '.widget_rss ul' ).addClass( 'media-list' );
- $( '.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' );
- $( '.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' );
- $( '.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' );
- $( '.widget_recent_comments ul#recentcomments' ).css( 'list-style', 'none').css( 'padding-left', '0' );
- $( '.widget_recent_comments ul#recentcomments li' ).css( 'padding', '5px 15px');
- $( 'table#wp-calendar' ).addClass( 'table table-striped');
- $('.wpcf7-form-control').not(".wpcf7-submit, .wpcf7-acceptance, .wpcf7-file, .wpcf7-radio").addClass('form-control');
- $('.wpcf7-submit').addClass('btn btn-primary');
- $('.page-scroller').on('click', function (e) {
- e.preventDefault();
- var target = this.hash;
- var $target = $(target);
- $('html, body').animate({
- 'scrollTop': $target.offset().top
- }, 1000, 'swing');
- });
- $(window).scroll(function(e) {
- var scroll = $(window).scrollTop();
- if (scroll >= 150) {
- $('#masthead').addClass('masthead-hide');
- } else {
- $('#masthead').removeClass('masthead-hide');
- }
- });
- });
- /****** accessibility for keyboard only users. https://git.io/vWdr2 ******/
- (function() {
- var isIe = /(trident|msie)/i.test( navigator.userAgent );
- if ( isIe && document.getElementById && window.addEventListener ) {
- window.addEventListener( 'hashchange', function() {
- var id = location.hash.substring( 1 ),
- element;
- if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
- return;
- }
- element = document.getElementById( id );
- if ( element ) {
- if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
- element.tabIndex = -1;
- }
- element.focus();
- }
- }, false );
- }
- })();
|