私は次のようなレイアウトを持っています:
<header class="header">
<div class="logo">Logo Here</div>
<nav class="menu">Menu Here</nav>
</header>
<div class="container">
<aside class="aside">
<!-- Here are the Buttons that Filters the Content in .main-content class -->
</aside>
<div class="main-content">
<!-- The list of contents here are shown according to the filter in sidebar -->
<!-- The contents are lets say only tables and Ajax button does its filter -->
<div class="export-link">Export Link</div> <!-- This export list is created by Ajax and for every filter value the link changes -->
</div>
</div>
<footer class="footer">
<div class="some-links">Some Links</div>
</footer>
div.export-link
に入れたいnav.menu
。
最初は次のようなことをしました
if($('.new__nav-class').length === 0 ){
$('.menu, .export-link').wrapAll('<div class="new__nav-class"> </div>');
}
これにより、ヘッダー セクションのnew内にdiv.export-link
andが配置され、CSS を適用して見栄えを良くすることができます。nav.menu
div.new__nav-class
ただし、問題はフィルター値を取得しないことです。のようにフィルターに合わせてlink
中.export-link
が変化していましたhref="/page?Thisfilter-Thatfilter"
が、ラッパーをdivの上に置いてメニューに配置したため、リンクが静的になりました。
これを修正する方法はありますか?