<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Clay Dropdown doesn't work</title>
  <link rel="self" href="https://liferay.dev/nl/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121227985" />
  <subtitle>Clay Dropdown doesn't work</subtitle>
  <id>https://liferay.dev/nl/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121227985</id>
  <updated>2026-06-01T18:03:39Z</updated>
  <dc:date>2026-06-01T18:03:39Z</dc:date>
  <entry>
    <title>Clay Dropdown doesn't work</title>
    <link rel="alternate" href="https://liferay.dev/nl/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121227984" />
    <author>
      <name>Eric COQUELIN</name>
    </author>
    <id>https://liferay.dev/nl/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121227984</id>
    <updated>2021-11-02T20:10:09Z</updated>
    <published>2021-11-02T20:10:08Z</published>
    <summary type="html">&lt;p&gt;Dear community,&lt;/p&gt;
&lt;p&gt;Based on Clay, I should be able to make dropdown work quite easily: https://clayui.com/docs/components/drop-down.html&lt;/p&gt;
&lt;p&gt;Here is a sample of code&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-html"&gt;&amp;lt;div class=&amp;quot;fragment_355&amp;quot;&amp;gt;
	&amp;lt;button class=&amp;quot;btn btn-secondary dropdown-toggle&amp;quot; type=&amp;quot;button&amp;quot; id=&amp;quot;dropdownMenuButton&amp;quot; data-toggle=&amp;quot;dropdown&amp;quot; aria-haspopup=&amp;quot;true&amp;quot; aria-expanded=&amp;quot;false&amp;quot;&amp;gt;
    Dropdown button
  &amp;lt;/button&amp;gt;
	&amp;lt;div aria-labelledby=&amp;quot;dropdownMenuButton&amp;quot; class=&amp;quot;dropdown-menu&amp;quot;&amp;gt;
		&amp;lt;ul class=&amp;quot;list-unstyled&amp;quot;&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;active dropdown-item&amp;quot; href=&amp;quot;#1&amp;quot;&amp;gt;Selected Option&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#3&amp;quot;&amp;gt;Normal Option&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
			&amp;lt;li&amp;gt;
				&amp;lt;a class=&amp;quot;disabled dropdown-item&amp;quot; href=&amp;quot;#4&amp;quot; tabindex=&amp;quot;-1&amp;quot;&amp;gt;Disabled Option&amp;lt;/a&amp;gt;
			&amp;lt;/li&amp;gt;
		&amp;lt;/ul&amp;gt;
	&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When I put this piece of code into a fragment, I would expect the
  dropdown to initialize automatically. But nothing happens.&lt;/p&gt;
&lt;p&gt;From the console of my Liferay home page (no theme customization), I
  tried to run the following&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-javascript"&gt;$(&amp;quot;#dropdownMenuButton&amp;quot;).dropdown();&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I wanted to check if &amp;quot;dropdown&amp;quot; function was available.
  But... that's not the case.&lt;/p&gt;
&lt;p&gt;Copying the dropdown fragment which comes with Liferay, I noticed
  that it doesn't use Clay but only native javascript. Which is surprising...&lt;/p&gt;
&lt;p&gt;Can you please explain why :&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;fragment can't use JQuery or Clay libraries&lt;/li&gt;
  &lt;li&gt;Clay components are not available from the Liferay home page&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</summary>
    <dc:creator>Eric COQUELIN</dc:creator>
    <dc:date>2021-11-02T20:10:08Z</dc:date>
  </entry>
</feed>
