View Include theme css and js with functions in wordpress
This file contains 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
// Begin Include theme css and js function | |
function add_theme_css_js(){ | |
// Include css | |
wp_register_style( 'foonts', 'https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700', array(), '1.0', 'all' ); | |
wp_register_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css', array(), '2.0', 'all' ); | |
wp_register_style( 'stylesheet', get_template_directory_uri() . '/css/style.css', array(), '1.0', 'all' ); | |
wp_enqueue_style('foonts'); | |
wp_enqueue_style('flexslider'); |
View Create Feature image with background image
This file contains 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
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
if ( has_post_thumbnail() ) { | |
$feat_image_url = wp_get_attachment_url( get_post_thumbnail_id() ); | |
echo '<div style="background-image:url('.$feat_image_url.');"></div>'; | |
} | |
endwhile; | |
endif; |
View jquery.rwdImageMaps.min.js
This file contains 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
// Calling script | |
if( $('div.map-image').length){ | |
$('img[usemap]').rwdImageMaps(); | |
} | |
/* | |
* rwdImageMaps jQuery plugin v1.5 | |
* |
View Scroll top with definite section.js
This file contains 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
$(window).scroll(function(){ | |
var contentNav = $('section.hero-section').height() | |
if($(window).scrollTop() > contentNav ){ | |
$('#content-nav').addClass('fixedNav') | |
$('#who-we-are').addClass('content-nav-fixed') | |
} | |
else{ | |
$('#content-nav').removeClass('fixedNav') |
View Input field focus and blur advance function.js
This file contains 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
// Begin input common focus and blur for value. | |
$('input:text,input:password,textarea').focus(function(){ | |
if(this.value==this.defaultValue){ | |
this.value=''; | |
} | |
}) | |
$('input:text,input:password,textarea').blur(function(){ | |
if(!this.value){this.value=this.defaultValue;} | |
if(this.value==this.defaultValue){ |
View Expand Search box with click submit btn function.html
This file contains 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
<style> | |
/* Search box style */ | |
.search-wrap{position: absolute; right: 0; top: 15px; z-index: 1;} | |
.search-wrap.search-box-expanded{z-index: 3;} | |
.search-form-warp{float: left; width: 100%; position: relative;} | |
.expand-btn{position: absolute; right: 0; width: 35px; height: 35px; background: transparent; z-index: 5; cursor: pointer;} | |
.value-added .expand-btn{z-index: 2;} | |
.input-field{position: absolute; top: 0; right: 45px; width: 200px; height: 35px; z-index: 5; overflow: hidden;} | |
.search-wrap input[type="text"]{float: left; border: 1px solid #dfded8; color: #dfded8; padding: 0 10px; display: block; position: absolute; top: 0; right: -200px; width: 200px; height: 35px; margin: 0; padding: 0 10px; font-size: 18px; -webkit-backface-visibility: none; -moz-backface-visibility: none; -ms-backface-visibility: none; backface-visibility: none; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; -webkit-transition: right 0.3s; -moz-transition: right 0.3s; -ms-transition: r |
View FlexSlider.html
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>FlexSlider</title> | |
<style type="text/css"> | |
/* | |
File name ===>> flexslider.css |
View Textarea Auto expand script.js
This file contains 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
if($('#long-answer-box').length){ | |
var textarea = document.querySelector('textarea'); | |
textarea.addEventListener('keydown', autosize); | |
function autosize(){ | |
var el = this; | |
setTimeout(function(){ | |
el.style.cssText = 'height:auto; padding:0'; |
View Animate scroll body html function.js
This file contains 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
$('html, body').stop(true, true).animate({ | |
scrollTop: $('#cape-colonial').offset().top - 54 | |
}, 1500, 'easeInOutCubic' ); |
OlderNewer