This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.scfloatPC { | |
right: 0; | |
position: fixed; | |
top: 50%; | |
transform: translateY(-50%); | |
z-index: 999; | |
text-align: center; | |
} | |
.scfloatPC a { | |
display: block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 id="changingtext">We Are <span>Digital </span>Marketing.</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//defer js | |
function defer_parsing_of_js($url) | |
{ | |
if (is_admin()) return $url; | |
if (false === strpos($url, '.js')) return $url; | |
if (strpos($url, 'jquery.js')) return $url; | |
if (strpos($url, ' js-mini.js')) return $url; | |
return str_replace(' src', ' defer src', $url); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//remove company name | |
add_filter( 'woocommerce_checkout_fields' , 'remove_company_name' ); | |
function remove_company_name( $fields ) { | |
unset($fields['billing']['billing_company']); | |
return $fields; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var $a = $(".tabs li"); | |
$a.click(function() { | |
$a.removeClass("active"); | |
$(this).addClass("active"); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.dropdown-menu a.dropdown-toggle').on('click', function(e) { | |
if (!$(this).next().hasClass('show')) { | |
$(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); | |
} | |
var $subMenu = $(this).next(".dropdown-menu"); | |
$subMenu.toggleClass('show'); | |
$(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) { | |
$('.dropdown-submenu .show').removeClass("show"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//**********Sticky Header********** | |
$(window).on('scroll', function (){ | |
var sticky = $('header'), | |
scroll = $(window).scrollTop(); | |
if (scroll >= 100) sticky.addClass('sticky'); | |
else sticky.removeClass('sticky'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// Define the offset | |
var offset = -200; // Adjust this value as needed | |
// Function to scroll to the target with offset | |
function scrollToTarget(target) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top + offset | |
}, 1000); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Replace carousel images into background images. | |
$('#carousel .item img').each(function() { | |
var imgSrc = $(this).attr('src'); | |
$(this).parent().css({'background-image': 'url('+imgSrc+')'}); | |
$(this).remove(); | |
}); |