Skip to content

Instantly share code, notes, and snippets.

View caiowilson's full-sized avatar
💭
baking a cake.

Caio Wilson caiowilson

💭
baking a cake.
View GitHub Profile
@caiowilson
caiowilson / README.md
Created October 30, 2020 20:46 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
<?php
function recursive($array){
foreach($array as $key => $value){
//If $value is an array.
if(is_array($value)){
//We need to loop through it.
recursive($value);
} else{
//It is not an array, so print it out.
echo $key . ": " . $value, '<br>';
@caiowilson
caiowilson / Http.js
Created November 27, 2015 12:36 — forked from manar007/Http.js
Promises with vanilla js, helper http function
// Support: http://caniuse.com/promises
function Http () {
/**
* Helper for http calls
* @param method
* @param url
* @param data
* @returns {Promise}
*/
function makeRequest(method,url,data) {