title: $(this).find("a").attr("onclick"); onclick giving invalid character
body: <p>I m creating a dynamic tab using Jquery its working fine but giving error for anchor tag <strong>onclick</strong> error is <strong>invalid character</strong>.
  See the javascript:</p>
  
  <pre><code>$(document).ready(function(){
  
      //when page loads...
      $(".tab_content").hide(); //hide all content
      $("ol.tabs li:first").addClass("active").show();  //Activate first tab
      $(".tab_content:first").show(); // show first tab content
  
      //on click event
      $("ol.tabs li").click(function(){
          $("ol.tabs li").removeClass("active"); //remove any "active" class
          $(this).addClass("active"); // add "active" class to selected tabs
          $(".tab_content").hide(); // hide all tab content
          //var activeTab = $(this).find("a").attr("href"); // find href attribute value to identify the active tab + content
          var activeTab = $(this).find("a").attr("onclick"); // find href attribute value to identify the active tab + content
          $(activeTab).fadeIn(); // fadeIn the active ID content
          alert(activeTab);
          return false;
      });
  
  });
  </code></pre>
  
  <p>And the HTML:</p>
  
  <pre><code>&lt;div&gt;
      &lt;div id="tab1" class="tab_content"&gt;01&lt;/div&gt;
      &lt;div id="tab2" class="tab_content"&gt;02&lt;/div&gt;
      &lt;div id="tab3" class="tab_content"&gt;03&lt;/div&gt;
  &lt;/div&gt;
  &lt;ol class="tabs"&gt;
      &lt;li&gt;&lt;a onclick="#tab1"&gt;Unique benefits&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a onclick="#tab2"&gt;Insurance&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a onclick="#tab3"&gt;Business Loan&lt;/a&gt;&lt;/li&gt;
  &lt;/ol&gt;
  </code></pre>
  
  <p>If i use <code>var activeTab = $(this).find("a").attr("href");
  </code>
  Its work fine.
  Help out</p>