<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: adding onclick to module in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635693#M28772</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/388078"&gt;@DNeubauer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would check out that if statement.&amp;nbsp; instead of using your declared variable &lt;STRONG&gt;menuBox&lt;/STRONG&gt;, you are using an undefined variable &lt;STRONG&gt;dropdown-content-mobile&lt;/STRONG&gt; which appears to be a css ID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/250023"&gt;@Oezcan&lt;/a&gt; , what do you think?&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 14:44:18 GMT</pubDate>
    <dc:creator>dennisedson</dc:creator>
    <dc:date>2022-05-19T14:44:18Z</dc:date>
    <item>
      <title>adding onclick to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635316#M28759</link>
      <description>&lt;P&gt;Trying to create a hamburger menu but the HTML is not reading my onclick. This is my button:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;button&lt;BR /&gt;class="dropbtn-mobile"&lt;BR /&gt;onclick="toggleMenu()"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And my js:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function toggleMenu() {&lt;BR /&gt;console.log('hello');&lt;BR /&gt;var menuBox = document.getElementById('dropdown-content-mobile');&lt;BR /&gt;if(dropdown-content-mobile.style.display == "block") { // if is menuBox displayed, hide it&lt;BR /&gt;dropdown-content-mobile.style.display = "none";&lt;BR /&gt;}&lt;BR /&gt;else { // if is menuBox hidden, display it&lt;BR /&gt;dropdown-content-mobile.style.display = "block";&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It says my function is not defined.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 21:56:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635316#M28759</guid>
      <dc:creator>DNeubauer</dc:creator>
      <dc:date>2022-05-18T21:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: adding onclick to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635693#M28772</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/388078"&gt;@DNeubauer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would check out that if statement.&amp;nbsp; instead of using your declared variable &lt;STRONG&gt;menuBox&lt;/STRONG&gt;, you are using an undefined variable &lt;STRONG&gt;dropdown-content-mobile&lt;/STRONG&gt; which appears to be a css ID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/250023"&gt;@Oezcan&lt;/a&gt; , what do you think?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 14:44:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635693#M28772</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-05-19T14:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: adding onclick to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635714#M28777</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/388078"&gt;@DNeubauer&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;seems like a pretty "complicated" function for just a toggle effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this(don't forget to load jQuery before this code):&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$( ".dropbtn-mobile" ).click(function() {
$( ".dropdown-content.mobile" ).slideToggle( "slow", function());
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;- jumping in since&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/250023"&gt;@Oezcan&lt;/a&gt;&amp;nbsp;is on vacation&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 15:09:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635714#M28777</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2022-05-19T15:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: adding onclick to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635717#M28778</link>
      <description>&lt;P&gt;Let him know that he is not being paid while on this vacation &lt;span class="lia-unicode-emoji" title=":upside_down_face:"&gt;🙃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 15:11:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/adding-onclick-to-module/m-p/635717#M28778</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-05-19T15:11:37Z</dc:date>
    </item>
  </channel>
</rss>

