code: function(className, options)
  {
      options = $.extend({
          el: 'div',
          attributes: {},
          css: {},
          parent: null,
          children: [],
          data: {}
      }, options);
  
       /* Unfortunately, jquery doesn't seem to like to set some attributes as DOM properties. (Notably href for off-DOM objects!!)
          Converting the attributes to a string and making that part of the $el constructor forces jquery to use innerHTML for atts. Yes, slower.
          If there's any problem constructing elements, use the following line:*/
      //  var $el = $( '<'+ options.el + obj_to_attr(options.attributes) +' />' ).css( options.css );
      var $el = $( '<'+ options.el +' />', options.attributes ).css( options.css );
  
      $el.addClass(className);
  
      if (options.parent!=null)
          options.parent.append($el);
      for (var i=0; i<options.children.length; i++)
          $el.append(options.children[i]);
      for (var p in options.data)
          $el.attr('data-'+p, options.data[p]);
      return $el;
  }
docs: Place any jQuery/helper plugins in here.