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
// Ajax File upload with jQuery and XHR2 | |
// Sean Clark http://square-bracket.com | |
// xhr2 file upload | |
$.fn.upload = function(remote, data, successFn, progressFn) { | |
// if we dont have post data, move it along | |
if (typeof data != "object") { | |
progressFn = successFn; | |
successFn = data; | |
} |
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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
if(isset($_FILES) && (bool) $_FILES) { | |
$allowedExtensions = array("pdf","doc","docx","gif","jpeg","jpg","png","rtf","txt"); | |
$files = array(); |
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 | |
class Nodesystem extends App { | |
function save() { | |
// get the post data | |
$post = $this->_safeMysql(); | |
$this->_log('ID', $post['id']); | |
//get a user id |
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 ParallaxItem(containerNode) { | |
var container, bgElements, offset, bgHeight, containerHeight, maxScrolls, height; | |
container = Y.one(containerNode); | |
bgElements = container.all('.parallax-background'); | |
function refreshCoords() { | |
offset = container.getY(); | |
containerHeight = container.get('offsetHeight'); | |
bgHeights = []; | |
maxScrolls = []; | |
bgElements.each(function(item) { |
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> | |
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script src="realtime.js"></script> | |
<style type="text/css"> | |
#chat { | |
width:300px; | |
height:300px; | |
border:1px solid black; |
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
$.fn.upload = function(remote,data,successFn,progressFn) { | |
// if we dont have post data, move it along | |
if(typeof data != "object") { | |
progressFn = successFn; | |
successFn = data; | |
} | |
return this.each(function() { | |
if($(this)[0].files[0]) { | |
var formData = new FormData(); | |
formData.append($(this).attr("name"), $(this)[0].files[0]); |
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
// Ajax File upload with jQuery and XHR2 | |
// Sean Clark http://square-bracket.com | |
// xhr2 file upload | |
// data is optional | |
$.fn.upload = function(remote,data,successFn,progressFn) { | |
// if we dont have post data, move it along | |
if(typeof data != "object") { | |
progressFn = successFn; | |
successFn = data; | |
} |
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
<nav> | |
<div class="row"> | |
<div class="col-xs-6"></div> | |
<div class="col-xs-6"></div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-6"></div> | |
<div class="col-xs-6"></div> | |
</div> | |
<div class="row" style="height:0%"> |
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
module.exports = { | |
add(req, res) { | |
var data = req.body; | |
app.models.file.upload(req.files).then(function(result) { | |
res.json(result); | |
}); | |
}, |
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
// ========== | |
// = Animated Scroll = | |
// ========== | |
(function($) { | |
$.modal = bootbox; | |
$('#top-section').parallax("50%", 0.1); | |
$('#work').parallax("50%", 0.3); | |
$('#about').parallax("50%", 0.1); |