title: Get all attributes of an object - not working in IE
body: <p>In the following code, I included an attribute for debugging.  In FF and Chrome, I get a ton of alerts saying "attribute found", but in IE, I get nothing.  The function returns an empty array.</p>
  
  <p>I have also tried removing the <code>console.info(this)</code> line.</p>
  
  <p>BTW, I'm using SPServices to access lists from SharePoint 2010 -- I'm trying to get all the columns of a list.</p>
  
  <pre><code>/*!
   * listAttributes jQuery Plugin v1.1.0
   *
   * Copyright 2010, Michael Riddle
   * Licensed under the MIT
   * http://jquery.org/license
   *
   * Date: Sun Mar 28 05:49:39 2010 -0900
   */
  
   //THIS ISN'T WORKING IN IE
  if(jQuery) {
      jQuery(document).ready(function() {
          jQuery.fn.listAttributes = function(prefix) {
              var list = [];
              var attributes = [];
              $(this).each(function() {
                  console.info(this);
                  for(var key in this.attributes) {
                  alert("attribute found");
                      if(!isNaN(key)) {
                          if(!prefix || this.attributes[key].name.substr(0,prefix.length) == prefix) {
                              attributes.push(this.attributes[key].name);
                          }
                      }
                  }
                  list.push(attributes);
              });
              return attributes;
          }
      });
  }
  //end listAttributes Plugin - use this to see what attributes 
  
  
  function ImportSPListColumnsToArray(ListName)
  {
      var ArrayForStorage = new Array();
  $(document).ready(function() {
  
  
    $().SPServices({
      operation: "GetListItems",
      async: false,
      listName: ListName,
      CAMLViewFields: "",
      CAMLQueryOptions: "&lt;QueryOptions&gt;&lt;ViewAttributes Scope='RecursiveAll'/&gt;&lt;/QueryOptions&gt;",
      **completefunc: function (xData, Status) {
        $(xData.responseXML).find("[nodeName='z:row']").each(function() {
        //find all fields used by each row and aggregate them without duplicating
        var row_attr = $(this).listAttributes();**
        for (var i=0; i&lt;row_attr.length; i++)
          {
              if ($.inArray(ArrayForStorage, row_attr[i]) == -1)
                  {
                      ArrayForStorage.push(row_attr[i]);
                  }
          }
        row_attr.clear();
        });
      }
    });
  
  });
    return ArrayForStorage;
  
  }
  </code></pre>