<?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: Why is my Javascript code not working? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421434#M27768</link>
    <description>&lt;P&gt;Hi @anmar0293, Great, I'm glad you figured it out! Would you mind posting an explanation for how you solved your problem below? It would be great to pass on that knowledge to other users who may be having a similar issue. Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2018 17:41:31 GMT</pubDate>
    <dc:creator>mstjohn_splunk</dc:creator>
    <dc:date>2018-08-27T17:41:31Z</dc:date>
    <item>
      <title>Why is my Javascript code not working?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421431#M27765</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1"&amp;gt;
&amp;lt;style&amp;gt;
.accordion {
    background-color: #002B51;
    color: white;
    cursor: pointer;
    padding: 18px;
    width: 40%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    transition: 0.4s;
}

.active, .accordion:hover {
    background-color: #2d8dd5;
}

.accordion:after {
    content: '\002B';
    color: white;
    font-weight: bold;
    float: right;
    margin-left: 5px;

}

.active:after {
    content: "\2212";

}

.panel {
    padding: 0 18px;
    background-color: silver;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
width: 35.7%
}


&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;




&amp;lt;button class="accordion"&amp;gt;Lifecycle Hygiene

&amp;lt;/button&amp;gt;
&amp;lt;div class="panel"&amp;gt;
  &amp;lt;p&amp;gt;Lifecycle Hygiene &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;



&amp;lt;script&amp;gt;
var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i &amp;lt; acc.length; i++) {
  acc[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var panel = this.nextElementSibling;
    if (panel.style.maxHeight){
      panel.style.maxHeight = null;
    } else {
      panel.style.maxHeight = panel.scrollHeight + "px";
    } 
  });
}
&amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Everything is fine, except the list should by dropped down by the Jquary code on the script section. not sure why id doesn't get executed.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 24 Aug 2018 15:47:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421431#M27765</guid>
      <dc:creator>Anmar0293</dc:creator>
      <dc:date>2018-08-24T15:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Javascript code not working?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421432#M27766</link>
      <description>&lt;P&gt;Hi @Anmar0293! Would you mind giving us a little bit more info about this problem? For example, what are you trying to do with this JS code,etc... That way, users who are having a similar issue could learn from this thread. &lt;/P&gt;

&lt;P&gt;Thanks and happy Splunking! &lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 16:25:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421432#M27766</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-08-24T16:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Javascript code not working?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421433#M27767</link>
      <description>&lt;P&gt;@mstjohn, &lt;/P&gt;

&lt;P&gt;Thank you for replying to me. I have solved the issue. thank you! &lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 17:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421433#M27767</guid>
      <dc:creator>Anmar0293</dc:creator>
      <dc:date>2018-08-27T17:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Javascript code not working?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421434#M27768</link>
      <description>&lt;P&gt;Hi @anmar0293, Great, I'm glad you figured it out! Would you mind posting an explanation for how you solved your problem below? It would be great to pass on that knowledge to other users who may be having a similar issue. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 17:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-my-Javascript-code-not-working/m-p/421434#M27768</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-08-27T17:41:31Z</dc:date>
    </item>
  </channel>
</rss>

