I have a layout like:
<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>
I want that div.export-link
to place in nav.menu
.
At first I did something like
if($('.new__nav-class').length === 0 ){
$('.menu, .export-link').wrapAll('<div class="new__nav-class"> </div>');
}
This places the div.export-link
and nav.menu
inside new div.new__nav-class
in the header section, and I can apply CSS to make it pretty.
However the problem is it doesn't take the filter value anymore. The link
inside the .export-link
used to change according to the filter like href="/page?Thisfilter-Thatfilter"
, but since I put the wrapper in top of the div and placed it in the menu, the link has become static.
Any solution how to fix this?