title: jquery alert says undefined
body: <p>Hi, I'm trying to get the alert method to show the value c8 but it just says undefined.</p>
  
  <p>I'm new to html and jquery; it's simple but I just can't see it. </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;script type="text/javascript" src="jquery/jquery-1.7.1.js"&gt;&lt;/script&gt;
      &lt;script&gt;
        $(document).ready(function(){
          $("button").click(function(){
        //$("#div1").load("hs.php");
        //$("#div1").load("http://127.0.0.1:81/tenHsServer/tenHsServer.aspx?t=ab&amp;f=DeviceStatus&amp;d=A1");
          $("#div1").load("http://127.0.0.1:81/tenHsServer/tenHsServer.aspx?t=ab&amp;f=ToggleDevice&amp;d=c8");
          alert($(this).prev().attr(".class"));
         });
        });
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="div1"&gt;&lt;h2&gt;Let jQuery AJAX Change This Text&lt;/h2&gt;&lt;/div&gt;
      &lt;span class='c8'&gt;&lt;button&gt;Get External Content&lt;/button&gt;&lt;/span&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>