• Im working with my own plugin and trying to add collapse panels for different categories

    The code im trying to use is

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Panels Demo</title>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="utils.js"></script>
    </head>
    
    <body>
    <div class="panel">
      <h2>One panel</h2>
      <div class="panelcontent">
    	<p>Content goes here</p>
    	<p>More content</p>
      </div>
    </div>
    
    <div class="panel">
      <h2>Another panel</h2>
      <div class="panelcontent">
    	<p>Content goes here</p>
    	<p>More content</p>
        <p>More content</p>
      </div>
    </div>
    
    <div class="panelcollapsed">
      <h2>Initially Collapsed</h2>
      <div class="panelcontent">
    	<p>This panel is collapsed by default (until user sets a preference)</p>
      </div>
    </div>
    <a href="javascript:expandAll()">Expand</a>
    <a href="javascript:collapseAll()">Collapse</a>
    </body>
    </html>

    It works outside wordpress but not inside… im new to this plugin stuff so would be awesome with some help

  • The topic ‘collapse panel inside plugin ?’ is closed to new replies.