 <p>Try</p> <pre><code>&lt;li class="nav-item" data-location="content.htm"&gt;About Us&lt;/li&gt; &lt;li class="nav-item" data-location="actsAndRules.htm"&gt;Rules&lt;/li&gt; </code></pre> <p>Then </p> <pre><code>$(function(){ $('.nav-item').click(function(){ if(!$elesToHide.is(":visible")){ $elesToHide.slideDown(); } $c.load($this.data('location') ) ; }) }) </code></pre>