Skip to content

Instantly share code, notes, and snippets.

View pat-eason's full-sized avatar
🐼

Pat Eason pat-eason

🐼
View GitHub Profile
@pat-eason
pat-eason / tableToDiv.js
Created June 24, 2014 18:19
Convert <table> to <div>
$('table').replaceWith( $('table').html()
.replace(/<tbody/gi, "<div id='table'")
.replace(/<tr/gi, "<div")
.replace(/<\/tr>/gi, "</div>")
.replace(/<td/gi, "<span")
.replace(/<\/td>/gi, "</span>")
.replace(/<\/tbody/gi, "<\/div")
);
@pat-eason
pat-eason / functions.php
Last active March 9, 2017 21:19
Split Menu structure for WordPress
<?php
/* ==========
Get Split Nav
include $menu_name for the menu you want and $raw=true if you want to return just the menu objects
========== */
function get_split_nav($menu_name=null, $raw=false){
if($menu_name == null || !is_string($menu_name)){
return false;
}
$output = new stdClass();