Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Verint Community 12.x
  • Verint Community
Verint Community 12.x
API Documentation collapseexpand UI Component
  • User Documentation
  • Ask the Community
  • API Documentation
  • Manager Training
  • Developer Training
  • Tags
  • More
  • Cancel
  • New
  • API Documentation
  • +In-Process API Documentation
  • +Plugin API Documentation
  • +REST API Documentation
  • -Widget, Theme, and Automation APIs
    • +Automation Events
    • -Client-side APIs
      • +Client Messages
      • +Composer Plugins
      • +JavaScript API Modules
      • +jQuery Events
      • +jQuery Plugins
      • -UI Components
        • bookmark UI Component
        • code UI Component
        • collapseexpand UI Component
        • feature UI Component
        • html UI Component
        • Idea Voting UI Component
        • like UI Component
        • links UI Component
        • loading UI Component
        • masonry UI Component
        • moderate UI Component
        • page UI Component
        • poll UI Component
        • previewhtml UI Component
        • rate UI Component
        • resizedimage UI Component
        • scheduledfile UI Component
        • searchresult UI Component
        • select UI Component
        • squeezetext UI Component
        • tag UI Component
        • theater UI Component
        • tip UI Component
        • tourtip UI Component
        • viewhtml UI Component
        • webpreview UI Component
    • +Dynamic Configuration
    • +LESS Functions
    • +Script API Types
    • +Script APIs

collapseexpand UI Component


jQuery.telligent.evolution.ui.components.collapseexpand

UI Component which handles presentation of content that can be collapsed and expanded. Overrides can be provided at the theme level to present bookmarks differently.

Options

Data made available to instances of the component:

  • collapsetext: (string) Text label when content can be collapsed
  • expandtext: (string) Text label when content can be expanded

Default Implementation

For reference purposes or as the basis for an override:

$.telligent.evolution.ui.components.collapseexpand = {
    setup: function() {
    },
    add: function(elm, options) {
    var a = $('<a></a>').attr({href: '#'}).text(options.collapsetext);
        var isExpanded = false;
        a.on('click', 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();
     }
};

  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Telligent
  • Professional Services
  • Submit a Support Ticket
  • Become a Partner
  • Request a Demo
  • Contact Us

About
Privacy Policy
Terms of use
Copyright 2024 Verint, Inc.
Powered by Verint Community