I want to change the default triangle icons to a plus/minus (changing ui-icon-triangle-1-e and ui-icon-triangle-1-s to ui-icon-plus and ui-icon-minus). Where are these classes coded and how can I change the default in the JS or CSS, or override from within the UI? Thank you in advance!

Comments

arwolk’s picture

Nevermind, found it! /code/misc/ui/jquery.ui.accordion.min.js to change the default icons. Still curious how I might change on a case-by-case basis though rather than site-wide.

joelstein’s picture

jQuery UI Accordion gives you the option to specify which icons to use:
http://jqueryui.com/accordion/#custom-icons

With jQuery Update installed, I have jQuery UI 1.10.2 installed. In views-accordion.js, I added the following lines to the options to change to the "+" and "-" icons:

options = {
  header: headerSelector,
  ...
  icons: {
    header: "ui-icon-plus",
    activeHeader: "ui-icon-minus"
  }
};

It would be nice to add support in Views to select which icon can be used for the active and inactive headers.