Levi Johnson
Levi Johnson

Reputation: 31

How to add a div inside a dropdown

I've added several large centered icons on my page, one for a store, one for resources, and one for contact, once clicked they open a drop menu, that I would like fully styled, with divs, images, links, ect.

Basically a webpage inside a dropdown menu.

So far I can't figure it out.

<div class="storedrop">
<button onclick="myFunction()" class="dropbtn">PATTERNS</button>
<div id="myDropdown" class="dropdown-content">
  <div class="store">
    {% include storecontent.html %}
  </div>
</div>

This is most likely a backwards way of doing what I need, but I'm pretty new to wed dev.. This is my first website.

I googled for the past two hours and can't find the answer...any help is greatly appreciated.

Upvotes: 0

Views: 393

Answers (1)

Minh Bui
Minh Bui

Reputation: 1030

if you are using jquery, please try with below code, your html page will be loaded:

$( ".store" ).load( "storecontent.html" );

Load data from the server and place the returned HTML into the matched element. You can reach more detail here

Upvotes: 1

Related Questions