show element based on class
<p>I have html like this</p>

<pre><code> &lt;h2 class="Comprehensive Leadership"&gt;Comprehensive Leadership&lt;/h2&gt;&lt;a href="/topic/comprehensiveleadership"&gt;View all Comprehensive Leadership Programs &lt;/a&gt;
 &lt;br&gt;&lt;a href="/programs/pld/Pages/default.aspx" class="Comprehensive Leadership"&gt;Program for Leadership Development &amp;gt;&lt;/a&gt;&lt;br&gt;Dec 2011–Jun 2012&lt;br&gt;&lt;a href="/programs/gmp/Pages/default.aspx" class="Comprehensive Leadership"&gt;General Management Program &amp;gt;&lt;/a&gt;&lt;br&gt;Jan–May 2012&lt;br&gt;


&lt;h2 class="Corporate Governance"&gt;Corporate Governance&lt;/h2&gt;&lt;a href="/topic/corporategovernance"&gt;
View all Corporate Governance Programs &lt;/a&gt;&lt;br&gt;&lt;a href="/programs/ac/Pages/default.aspx" class="Corporate Governance"&gt;Audit Committees in a New Era of Governance &amp;gt;&lt;/a&gt;&lt;br&gt;Nov 13–15, 2011&lt;br&gt;&lt;a href="/programs/cc/Pages/default.aspx" class="Corporate Governance"&gt;Compensation Committees &amp;gt;&lt;/a&gt;&lt;br&gt;Nov 16–18, 2011&lt;br&gt;

&lt;div class="tabbed-content"&gt;&lt;ul class="tabs"&gt;&lt;li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="#" class="Comprehensive Leadership"&gt;Comprehensive Leadership&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#" class="Corporate Governance"&gt;Corporate Governance&lt;/a&gt;&lt;/li&gt;&lt;div&gt;
</code></pre>

<p>If I click Comprehensive Leadership it should only display first h2 tag by matching the class till next h2 tag, that is :</p>

<pre><code>&lt;h2 class="Comprehensive Leadership"&gt;Comprehensive Leadership&lt;/h2&gt;&lt;a href="/topic/comprehensiveleadership"&gt;View all Comprehensive Leadership Programs &lt;/a&gt;
 &lt;br&gt;&lt;a href="/programs/pld/Pages/default.aspx" class="Comprehensive Leadership"&gt;Program for Leadership Development &amp;gt;&lt;/a&gt;&lt;br&gt;Dec 2011–Jun 2012&lt;br&gt;&lt;a href="/programs/gmp/Pages/default.aspx" class="Comprehensive Leadership"&gt;General Management Program &amp;gt;&lt;/a&gt;&lt;br&gt;Jan–May 2012&lt;br&gt;
</code></pre>

<p>I can change the html little bit...i have also paste it here : <a href="http://jsfiddle.net/sMCsw/10/" rel="nofollow">http://jsfiddle.net/sMCsw/10/</a></p>
