Skip to content

Instantly share code, notes, and snippets.

var horses = [
{
"id": "1",
"horse": "Lookin At Lee",
"odds": "29-1",
"Owner": "L and N Racing, LLC",
"Trainer": "Steven M. Asmussen",
"Breeder": "Ray Hanson",
"Earnings": "$428,600",
},
@goodyis
goodyis / alpha.sort.table.rows.js
Created October 9, 2017 20:42
Alphabetically sorting table by rows, via td value using jQuery
$( "div.protected-downloads" ).each( function ( index ) {
$dType = $( this ).data( 'type' );
$combined = $dType + "_table";
$( this ).find(' table tbody' ).addClass( $combined );
$mylist = $( '.' + $combined );
$listitems = $mylist.find( 'tr:not(".hidden")' );
$listitems.sort( function( a, b ) {
return $( a ).text().toUpperCase().localeCompare( $( b ).text().toUpperCase() );
})
$.each( $listitems, function( idx, itm ) { $mylist.append( itm ); } );
@goodyis
goodyis / map.geojson
Last active April 26, 2024 16:03
Leaflet geojson v001
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goodyis
goodyis / wpforms-programmatically-create-entry.php
Last active August 27, 2024 14:34 — forked from renventura/wpforms-programmatically-create-entry.php
Snippet for programmatically creating entries in WPForms.
<?php
/*
Plugin Name: CSV to WPForms Entry
Description: Process a CSV file from the plugin directory to create WPForms entries.
Version: 2.0
Author: Your Name
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly