Skip to content

Instantly share code, notes, and snippets.

@bananabread
bananabread / cloudSettings
Created May 2, 2018 09:07
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-05-02T09:07:43.913Z","extensionVersion":"v2.9.1"}
@bananabread
bananabread / function.php
Created July 11, 2013 10:37
jQuery AJAX with error, loading and abort
<?php
if(isset($_POST['get_data'])) {
$table = '<table class="table table-bordered table-condensed table-hover">
<thead>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
@bananabread
bananabread / index.html
Created June 18, 2013 18:56
jQuery Fibbonacci
<input class="input" type="text"><br>
<button class="go">GO!</button>
<button class="reset">RESET</button>
<span class="result"></span>
@bananabread
bananabread / main.js
Created June 12, 2013 15:45
jQuery Text Sizer
// Reset Font Size
var originalFontSize = $('html').css('font-size');
$(".resetFont").click(function() {
$('html').css('font-size', originalFontSize);
});
// Increase Font Size
$(".increaseFont").click(function() {
var currentFontSize = $('html').css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum * 1.2;
@bananabread
bananabread / index.html
Created June 12, 2013 15:40
jQuery drag and drop specifc
<div class="drop red" data-accept="one">Drop</div>
<div class="drop blue" data-accept="two">Drop</div>
<div class="drag" data-accept="one">Drag Me Into Red</div>
<div class="drag" data-accept="two">Drag Me Into Blue</div>