Skip to content

Instantly share code, notes, and snippets.

View attila's full-sized avatar

Attila Beregszaszi attila

View GitHub Profile
@attila
attila / keybase.md
Created September 24, 2014 16:34
keybase.md

Keybase proof

I hereby claim:

  • I am attila on github.
  • I am attila (https://keybase.io/attila) on keybase.
  • I have a public key whose fingerprint is 250D 6A91 F602 62A9 66C7 8ADF E4EC 4774 F1CC 878D

To claim this, I am signing this object:

@attila
attila / jquery.prebind.js
Last active February 21, 2017 00:11 — forked from jonathanconway/jquery.prebind.js
Use $._data to get event data as $(this).data('events') has been removed from jQuery 1.8+
$.fn.preBind = function(type, data, fn) {
this.each(function() {
var $this = $(this);
$this.bind(type, data, fn);
var currentBindings = $._data($this[0], 'events');
if ($.isArray(currentBindings[type])) {
currentBindings[type].unshift(currentBindings[type].pop());
}