View RSS Feed

Recent Blogs Posts

  1. DOM manipulation code

    Here's some of my personal DOM manipulation code:

    Code:
    Object.extend = function(o1, o2) {
      for (var x in o2)
        if (o2.hasOwnProperty(x))
          o1[x] = o2[x];
    
      return o1;
    };
    
    Object.extend(Object, {
      copy: function(o) {
        return Object.extend({}, o);
      },
    
      fromArray: function(o) {
        var r = {};
    
        Array.map(function(pair) { r[pair[0]] = pair[1]; }, a);
    ...

    Updated 04-06-2009 at 12:47 AM by Twey

    Tags: sssss Add / Edit Tags
    Categories
    Post a JavaScript , JavaScript & Ajax