Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have two menu e.g

Second menu i created:

HTML
<div class="menu2">
<ul class="center">
<li><a href="" target="_parent"></a></li>
<li><a href="" target="_parent"></a></li>
</ul>	
</div>


First menu. This created from a cms by default:

HTML
<div class="top-bar-section">
<ul class="left home-active" data-position="2">
<ul class="center">
<li><a href="" target="_parent"></a></li>
<li><a href="" target="_parent"></a></li>
</ul>
</ul>



How can i add the il from the second menu to first menu with javascript when the @media screen and (max-width: 640px)

What I have tried:

JavaScript
<script>
	if($(window).width() < 641){
		
	}
</script>
Posted
Comments
Andre Oosthuizen 25-Jan-23 4:48am    
What do you mean by "add"? Do they have the same target as _parent states, i.e., will they link to the same page or item?
[no name] 25-Jan-23 4:56am    
I want to move items of menu 2 to menu 1.... because when the max-width: 640px by default create a hamburger menu only for menu 1 and i want to move all items of menu 2 to same hamburger

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900