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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> |
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
error_reporting(E_ALL); | |
ini_set('display_errors', 'On'); | |
ini_set('html_errors', 'On'); |
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
$("#contact-form").submit(function(e) { | |
e.preventDefault(); | |
var name = $("#name").val(), | |
email = $("#email").val(), | |
subject = $("#subject").val(), | |
message = $("#message").val(); | |
$.ajax({ | |
type: "POST", | |
url: "contact.php", | |
data: { |
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
$(window).scroll(function() { | |
if($(window).scrollTop() > 300){ | |
$("#top").fadeIn(); | |
} else{ | |
$("#top").fadeOut(); | |
} | |
}); | |
$("#top").click(function() { | |
$("html, body").animate({ scrollTop: 0 }, 600); | |
return false; |
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
var curPage = ["index", "features", "blog", "gallery", "contact"], | |
selected; | |
curPage.forEach(function(page) { | |
if(window.location.href.indexOf(page) != -1) { | |
$("#"+page+"-nav").addClass("current"); | |
} | |
}); |
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 isValidEmail(email) { | |
return ( /(.+)@(.+){2,}\.(.+){2,}/.test(email) ); | |
} |
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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
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
register_sidebar( array( | |
'name' => __( 'Homepage 2 Facebook Widget', 'twentyeleven' ), | |
'id' => 'sidebar-212', | |
'description' => __( 'Facebook Widget For Homepage 2 Template', 'twentyeleven' ), | |
'before_widget' => '<div id="homepage2-facebook" class="widget %2$s">', |
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
UPDATE tableName SET columnName = REPLACE ( | |
columnName, | |
'TEXT TO REPLACE', | |
'TEXT TO REPLACE WITH') |
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
if ( ! function_exists('product_post_type') ) { | |
// Register Custom Post Type | |
function product_post_type() { | |
$labels = array( | |
'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ), | |
'singular_name' => _x( 'Product', 'Post Type Singular Name', 'text_domain' ), | |
'menu_name' => __( 'Product', 'text_domain' ), | |
'parent_item_colon' => __( 'Parent Product:', 'text_domain' ), | |
'all_items' => __( 'All Products', 'text_domain' ), |
OlderNewer