Skip to content

Instantly share code, notes, and snippets.

View jeremylangerpersonal's full-sized avatar

Jeremy Langer jeremylangerpersonal

View GitHub Profile
@apintocr
apintocr / wc-bookings-availability-search.php
Last active September 15, 2022 12:16
WooCommerce Bookings Availability Search
<?php
/**
* WooCommerce Bookings Availability Search
*
* This is almost pseudo code, it only serves to explain the "how to do it" and does not attempt to be "The Way" to do it.
* NOTE: This NEEDS to be refined in order to work as expected.
*
* @author António Pinto <apinto@vanguardly.com>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@brandonaaskov
brandonaaskov / jQuery Change Event: Proper Binding
Created January 11, 2012 21:34
jQuery's change() event doesn't work as expected with input text fields. This, however, does work.
/*
For some reason, the change() event only fires when the input field loses focus.
Binding to other options ('change keypress paste focus textInput input') will
fire the event several times, which is bad. The below code works even when
content is pasted into the text field, and only fires once as expected.
*/
$('#search-form .term').bind('input', function(){
console.log('this actually works');
});