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
PHP Code: | |
-------------- | |
<?php | |
// Only process POST reqeusts. | |
if ($_SERVER["REQUEST_METHOD"] == "POST") { | |
// Get the form fields and remove whitespace. | |
$name = strip_tags(trim($_POST["name"])); | |
$name = str_replace(array("\r","\n"),array(" "," "),$name); | |
$email = filter_var(trim($_POST["email"]), FILTER_SANITIZE_EMAIL); |
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
/* Search area-Start */ | |
.search-area { | |
text-align: center; | |
} | |
.search-icon { | |
border: 1px solid transparent; | |
color: #333; | |
display: inline-block; | |
font-size: 17px; |
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
var feed = new Instafeed({ | |
get: 'user', | |
userId: 6665768655, | |
accessToken: '6665768655.1677ed0.313e6c96807c45d8900b4f680650dee5', | |
target: 'Instafeed', | |
resolution: 'thumbnail', | |
limit: 6, | |
template: '<li><a href="{{link}}" target="_new"><img src="{{image}}" /></a></li>', | |
}); | |
feed.run(); |
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
$('.menu a[href*="#"]:not([href="#"])').on("click" , function() { | |
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return false; | |
} |
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
function scrollToTop($topClass){ | |
var top_0 = {scrollTop:0}; | |
var topClass = $($topClass); | |
topClass.on("click" , function(e){ | |
$("html,body").animate(top_0,1000); | |
return false; | |
}); | |
$(window).scroll(function(){ | |
if($(this).scrollTop() > 400) { | |
topClass.fadeIn(500); |
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
// Check the initial Poistion of the Sticky Header | |
var stickyHeaderTop = $('#stickyheader').offset().top; | |
$(window).scroll(function(){ | |
if( $(window).scrollTop() > stickyHeaderTop ) { | |
$('#stickyheader').css({position: 'fixed', top: '0px'}); | |
$('#stickyalias').css('display', 'block'); | |
$('#stickyheader').addClass('fix-top'); | |
} else { | |
$('#stickyheader').css({position: 'static', top: '0px'}); | |
$('#stickyalias').css('display', 'none'); |
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
$('.count').each(function () { | |
$(this).prop('Counter',0).animate({ | |
Counter: $(this).text() | |
}, { | |
duration: 4000, | |
easing: 'swing', | |
step: function (now) { | |
$(this).text(Math.ceil(now)); | |
} | |
}); |