Skip to content

Instantly share code, notes, and snippets.

View mhujer's full-sized avatar
🏠
Working remotely

Martin Hujer mhujer

🏠
Working remotely
View GitHub Profile
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@mathiasbynens
mathiasbynens / jquery.insertAtCaret.js
Created March 9, 2010 11:13
jQuery insertAtCaret plugin
// I found this somewhere on the intertubes, and optimized it
$.fn.insertAtCaret = function(myValue) {
return this.each(function() {
var me = this;
if (document.selection) { // IE
me.focus();
sel = document.selection.createRange();
sel.text = myValue;
me.focus();
} else if (me.selectionStart || me.selectionStart == '0') { // Real browsers