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 (context) { | |
'use strict'; | |
var require = context.require; | |
var requirejs = context.requirejs; | |
var define = context.define; | |
define(['require','jquery','lib/Util','GlobalEventDispatcher','GlobalResizeListener'],function (require) { | |
//define any required libraries - see config.js for registered names | |
var $ = require('jquery'), //require jQuery | |
util = require('lib/Util'), //require util for $debug |
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 (context) { | |
'use strict'; | |
var require = context.require; | |
var requirejs = context.requirejs; | |
var define = context.define; | |
define(function (require) { | |
//define any required libraries - see config.js for registered names | |
var $ = require('jquery'), //require jQuery | |
util = require('lib/Util'), //require util for $debug |
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
<?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); | |
$message = trim($_POST["message"]); |
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() { | |
// Get the form. | |
var form = $('#ajax-contact'); | |
// Get the messages div. | |
var formMessages = $('#form-messages'); | |
// Set up an event listener for the contact form. | |
$(form).submit(function(e) { | |
// Stop the browser from submitting the form. |
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
<form id="ajax-contact" class="form-horizonta" method="post" action="mailer.php"> | |
<div class="field form-group"> | |
<label for="name" class="control-label">Name:</label> | |
<input class="form-control" type="text" id="name" name="name"> | |
</div> | |
<div class="field form-group"> | |
<label for="email" class="control-label">Email:</label> | |
<input class="form-control" type="email" id="email" name="email"> | |
</div> | |
<div class="field form-group"> |
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 str = "<h2>Full Stack Development</h2>", | |
i = 0, | |
isTag, | |
text; | |
(function type() { | |
text = str.slice(0, ++i); | |
if (text === str) return; | |
document.getElementById('typewriter').innerHTML = text; | |
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
//draw on home image | |
var canvas = document.querySelector('#paint'); | |
var ctx = canvas.getContext('2d'); | |
var sketch = document.querySelector('.sketch'); | |
var sketch_style = getComputedStyle(sketch); | |
canvas.width = parseInt(sketch_style.getPropertyValue('width')); | |
canvas.height = parseInt(sketch_style.getPropertyValue('height')); | |
var mouse = {x: 0, y: 0}; | |
var last_mouse = {x: 0, y: 0}; |
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
//draw on home image | |
var canvas = document.querySelector('#paint'); | |
var ctx = canvas.getContext('2d'); | |
var sketch = document.querySelector('.sketch'); | |
var sketch_style = getComputedStyle(sketch); | |
canvas.width = parseInt(sketch_style.getPropertyValue('width')); | |
canvas.height = parseInt(sketch_style.getPropertyValue('height')); | |
var mouse = {x: 0, y: 0}; | |
var last_mouse = {x: 0, y: 0}; |
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 merge(obj1, obj2){ | |
var obj3 = []; | |
for (var i= 0, len = obj1.length; i < len; i++) { | |
obj3.push(obj1[i]); | |
obj3.push(obj2[i]); | |
} | |
return obj3; | |
} | |
//calls merge function, removes commas using join, displays output |
OlderNewer