title: Accessing cross-domain style sheet with .cssRules
body: <p>I get this error in Firebug when I try to access some CSS files hosted on external domains:</p>
  
  <pre><code>Security error" code: "1000
  rules = styleSheets[i].cssRules;
  </code></pre>
  
  <p>The code I am using is:</p>
  
  <pre><code>$(document).ready(function () {
      $("p").live('mousedown', function getCSSRules(element) {
          element = $(this);
          var styleSheets = document.styleSheets;
          var matchedRules = [],
              rules, rule;
          for (var i = 0; i &lt; styleSheets.length; i++) {
              rules = styleSheets[i].cssRules;
              for (var j = 0; j &lt; rules.length; j++) {
                  rule = rules[j];
                  if (element.is(rule.selectorText)) {
                      matchedRules.push(rule.selectorText);
                  }
              }
          }
          alert(matchedRules);
      });
  });
  </code></pre>
  
  <p>Is there a way to fix this, beside moving all the CSS files on the same domain?</p>