Skip to content

Instantly share code, notes, and snippets.

View martinjinda's full-sized avatar
💩

Martin Jinda martinjinda

💩
View GitHub Profile
@martinjinda
martinjinda / ICS.php
Created March 6, 2018 11:37 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* ICS.php
* =======
* Use this class to create an .ics file.
*
* Usage
* -----
* Basic usage - generate ics file contents (see below for available properties):
@martinjinda
martinjinda / jQuery Change Event: Proper Binding
Created September 23, 2015 11:22 — forked from brandonaaskov/jQuery Change Event: Proper Binding
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');
});