サイドナビゲーションのリンクの特定のdivonclickを強調表示しようとしています。これまでのところ(デフォルトページの場合)機能しますが、別のページに移動してサイドナビゲーションの項目をクリックすると、指定したdivに固定されますが、強調表示されません。リンクを強調表示するには、リンクを再度クリックする必要があります。
var App = {
SetBaseLine: function() {
jQuery("#priceRange, #satisfaction").removeClass("activeListColor");
}
};
jQuery(document).ready(function() {
jQuery('a#priceLink').click(function(e) {
App.SetBaseLine();
jQuery('#priceRange').addClass('activeListColor');
});
jQuery('a#satisfactionLink').click(function(e) {
App.SetBaseLine();
jQuery('#satisfaction').addClass('activeListColor');
});
<div id="priceRange">
<div class="header">Price Range<br /><a id="button1" href="javascript:toggle3('colcontent1','button1');" ><img src="images/more-info-button.png" width="76" height="20" /></a></div>
<div class="col2 topSpace">Packages start at $29.99/month</div>
<div class="col3"><span>Best Value</span><img src="images/red-trophy.png" class="trophy" /><br />Packages start at $19.99/month</div>
<div class="col4 topSpace">Packages start at $29.99/month</div>
</div> <!-- End of priceRange div -->
<div id="satisfaction">
<div class="header">Customer Satisfaction <br /><a id="button2" href="javascript:toggle3('colcontent2','button2');" ><img src="images/more-info-button.png" width="76" height="20" /></a></div>
<div class="col2 topSpace">American Customer Satisfaction Index (ACSI) Rating: 68 </div>
<div class="col3"><span>Most Popular</span><img src="images/red-trophy.png" class="trophy" /><br />American Customer Satisfaction Index (ACSI) Rating: 71 </div>
<div class="col4 topSpace">American Customer Satisfaction Index (ACSI) Rating: 61 </div>
</div> <!-- End of satisfaction div -->
助言がありますか??