Say you have a website with two menus and you want to move the child list items to the parent list items at a certain breakpoint (for mobile devices). This is how you go about accomplishing that:

Sample HTML

 

Sample jQuery

 

The above script it to simply move list items from one unordered list to another. You still have to write your own custom script to deal with how you want the menu to work. Here are a few inspirations from CodePen.