<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>collapseexpand UI Component</title><link>https://community.telligent.com/community/13/w/api-documentation/75810/collapseexpand-ui-component</link><description>&lt;p&gt;&lt;span&gt;Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.&lt;/span&gt;&lt;/p&gt;</description><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>collapseexpand UI Component</title><link>https://community.telligent.com/community/13/w/api-documentation/75810/collapseexpand-ui-component</link><pubDate>Fri, 08 Mar 2024 17:51:58 GMT</pubDate><guid isPermaLink="false">d3a2913b-0286-42be-9595-6cc8897778c4</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/13/w/api-documentation/75810/collapseexpand-ui-component#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 03/08/2024 17:51:58&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;jQuery.telligent.evolution.ui.components.collapseexpand&lt;/h3&gt;
&lt;p&gt;[[ui JavaScript API Module|UI Component]] which handles presentation of content that can be collapsed and expanded. [[ui JavaScript API Module|Overrides can be provided]] at the theme level to present bookmarks differently.&lt;/p&gt;
&lt;h3&gt;Options&lt;/h3&gt;
&lt;p&gt;Data made available to instances of the component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;collapsetext&lt;/code&gt;: (string) Text label when content can be collapsed&lt;/li&gt;
&lt;li&gt;&lt;code&gt;expandtext&lt;/code&gt;: (string) Text label when content can be expanded&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Default Implementation&lt;/h3&gt;
&lt;p&gt;For reference purposes or as the basis for an override:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.ui.components.collapseexpand = {
    setup: function() {
    },
    add: function(elm, options) {
    var a = $(&amp;#39;&amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;&amp;#39;).attr({href: &amp;#39;#&amp;#39;}).text(options.collapsetext);
        var isExpanded = false;
        a.on(&amp;#39;click&amp;#39;, function() {
            if(isExpanded) {
                elm.slideUp();
                a.text(options.collapsetext);
            }
            else {
                elm.slideDown();
                a.text(options.expandtext);
            }
            isExpanded = !isExpanded;
            return false;
        });
        elm.removeClass().before(a).hide();
     }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>