~lss-team/lilsoftstats/trunk

« back to all changes in this revision

Viewing changes to js/jquery/jquery.bind.js

  • Committer: Nick
  • Date: 2011-11-14 04:10:28 UTC
  • Revision ID: nick@little-apps.org-20111114041028-cvmpwq6z6hx3pkya
first commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @author trixta
 
3
 */
 
4
(function($){
 
5
 
 
6
$.bind = function(object, method){
 
7
        var args = Array.prototype.slice.call(arguments, 2);
 
8
        if(args.length){
 
9
                return function() {
 
10
                        var args2 = [this].concat(args, $.makeArray( arguments ));
 
11
                        return method.apply(object, args2);
 
12
                };
 
13
        } else {
 
14
                return function() {
 
15
                        var args2 = [this].concat($.makeArray( arguments ));
 
16
                        return method.apply(object, args2);
 
17
                };
 
18
        }
 
19
};
 
20
        
 
21
})(jQuery);