Toggles

Use toggles to organize your article content in a way that makes it easy for your visitors to find what they're looking for.

Standard toggles

Creating toggles within your article content doesn’t involve copying and pasting any HTML as the Tabs extension lets you transform standard ordered (<ol>) and unordered (<ul>) lists created in the article editor into interactive collapsible and expandable sections. This makes it easy for visitors to find what they’re looking and allows content creators to focus on producing helpful content.

If you do ever need to migrate your content you can do so without having to worry about unnecessary markup or inline styles.

The default toggles template
View code
<ul class="js-toggles">
  <li title="Android">
    <p>Android is a mobile operating system based on a modified version of the Linux kernel and other open source software, designed primarily for touchscreen mobile devices such as smartphones and tablets. Android is developed by a consortium of developers known as the Open Handset Alliance and commercially sponsored by Google. It was unveiled in 2007, with the first commercial Android device launched in September 2008.</p>
  </li>
  <li title="iOS">
    <p>iOS is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that presently powers many of the company's mobile devices, including the iPhone, and iPod Touch; it also powered the iPad prior to the introduction of iPadOS in 2019. It is the second most popular mobile operating system globally after Android. It is the basis for other operating systems made by Apple Inc, like iPadOS, tvOS, and watchOS.</p>
  </li>
  <li title="Windows">
    <p>Windows 10 Mobile is a discontinued mobile operating system developed by Microsoft. First released in 2015, it is a successor to Windows Phone 8.1, but was marketed by Microsoft as being an edition of its PC operating system Windows 10. Windows 10 Mobile aimed to provide greater consistency with its counterpart for PCs, including more extensive synchronization of content, the ability to to connect devices to an external display and use a desktop interface with mouse and keyboard input support.</p>
  </li>
</ul>

The default template is simple, elegant and responsive and will automatically inherit the overall style of your theme. You can add any type of content you like to each collapsible section, including HTML, images, videos and other article formatting styles.

Customized toggles

Using the options described on the Usage tab you can have the toggles behave an an accordion, where only one toggle can be expanded at a time, and create custom templates. Custom templates can be used to change completely change the look-and-feel of the toggles, add new elements like icons and even modify the behavior of the toggles themselves.

Large, custom toggles with icons
View code
52844041a4fcb608cf8080f7ac7a60b7ef6751a6bcc04b8268ea01a8a99bd60b856108ae0261cfbf6b2811649e884266b01a19a10175fe087841262328eb77c3e067264cbf5bc18e4a55499766cab890288d7772698d3f8d2aa54e1c199c75665af586ad1b07d17b04c6a88fd50cbf98f3324decdc3bc0639a96e210035058b891bce1b1754168b6dc47fac9a8b0498ce16c414ecf0aaff55086401cdb647547164dc2b3f8337b1aa43b1d674786b9ec1bb3294e5968efa426690323b99804f6b5a50e1821c7611837b547ec5f5d9ccf5de9abfd9c52f9defcc9f2dc20fae0a927d58173869d4db56850c893f8483b67bf2598bedb6f93643c88142397533db1bd183a3a20bcd25835399146d8c2d9693656fe5cbd15d0a70047a164b7618202d37d4fa87751bd21692a80a9f1ae25b6d447b04719341c04cdc32ee38434058727c744a143fabbe1423e46dc374d18198e4f7c46360e6557ce64d1bb51350d51f2bf0cdbea67c23420261e01e624450dd2c28ab8558056c950ba126ee2a93302603bb7ba9a15fcc087ac620e7efc6257f262072a3d47ac76e8260783b82fe88d9742074571961ca7bd4c737b477f53e21d729a2c75bed90c685d2a9a54e3068d0c6f4f776b34aaab5bcd689abe18c3df351c2f65c32b45494ba3b5fbe47d1f5af1b90eb617c2fa2be90262ef60aa2b13ffcccac86ff2bd58a93af79732d5458b2c57eb4e6f4f99fac5ce279440935f0a6bfd0623a2c11294b1d9e246a78c0b62a6a74ecf17308118cdae2d77619d83c647f87b83d1068137e15a96e9e06bf2671485bdf95168d9fd0013ff465f29d7e3a9afff619f39dba89a3366f587a6c93764337bdda8ae375c0a1bfdc2e0c8468cb2baaad6e8b3348c098303fa16a50b985003d9add2c351acb97b4d41bc28f821251ed5f0205871d63d1e0028c60ae89fe692de12618740d92517761a1b9f1becf2523cc17dda336ca863aaa1b17291f1ada8001efdf2a6db24540d63089ba153f3b6d9cd5102dcf3fc61b285a1f8a7394feeb2ffe03cd3aa2604e7a492a977539854c32a504fa5a805f1aced7bb936421a10e7571de8cbc9e6211860d3d7572cc027711e5e4558aeeb70d374830a043860b5c9fde9590e7cc4119a44710c397c245eb883ebed1f30a483b4ce194b45cad56fbae7454c763472c93601c3d70122dc4689f543f325cc0a32e702b69f4bcadb81c3007363c628e2c1da42d327bbe87aa122784ed89fc3f1c1860ba811eed9ee21a5ea0d3f230715ecdbb95a532a063596e6e15f906b02e9b56131979792c5e3c1ad89c7a55e2ad207b56deb6427a3e80d7e858cc673a92d89826e1aaecfb2be333cc8fb3fbc0a3f6848619239b44b8c1f76275fbbf235d74c3fb2371d0a24b973ef70708af1ce0619cde5f5655fa8008ca0d1189d7363bc5b0a0777e8d3f5a2a78aa93a38cb43b9ba37c04530c3fe00899ca297fa37ddd12c46bd809e188b24c0ead282fa48137fa5c703549355f7cc9748919efa9983ee501a889fe853cf41e06ba47f3287e69702764a4117a44d650c95ee853c44695a833adb719fa2b0e3781dc0e913f8b46c7d79bd2af766dbb934fa82abd3d53f9613a0ce8350580f842d58e7376dde92d6edcbe345545b3a9a595e0ea0bce16759a66a0faae06d8da5ac2f87bdf7a9a55e0bcab65d62e2f727e4dfd70a7743ae54681fc41f070a267bedf3f4599e1cafad807050062173637e5270eab252b14b10339e5d9edf0abfee92fa9b2f80a83aaa6cb193394ff21f00612144c538f9a6b07417e8917ea414ba10184bfeaeb3ca3d1215b641744ecaee6f9fbfb16ae997fd7973c430321e622fb3839c17967059d5b213a9936de34db30dd3cc8178d98c194279e10c45837941cd430449895bc8aa35270a24b3c41385a6ba1287f1422d33b3821f73663c9800a021bc2f0e632689750425ce832c040422a15f2a6529344e6aa03cfb03fe29875d0552598d848a503dc7ab8d31bca7abba6a28dd6978fedded2bb2e2ee0fa713f8e0a9ed1dbcf8fe55814a716abecd2958c408e0db917470f1f002f590d8ed50770ce9292dfb66d72962cb62c4bd939c85f3aa0049a49186903bbb5def417c9b99ade95db84ab7887016322aa4cff226a9323ac175cbcd52a2aa81803a71cfdda908bde4a016fcbf40c84ddeb8d1f26ca4930c258320e9f56c7e749fa022f9ae1d0267139c174cd3afccd231713645935e90729970114d3483810f07765f364b329a46ee82a795c29853a7f6420fd06c00f99e98d8479c3e047838cb719c387094fe6c548c6ce9b233ce255b67dd6327637a6b6cf927d08f6cfd36a1ddb3ddbaa86bcd08393690916e45b299ae39ff0a6d0bc864ead8cbcb5096ebe65a3a47f332038d641e095b179fd329d1888572d44ea4e4e57acc305eb75e05ef1bb28ed467d3183a42f770f2ba0c63f3d131293bd4f8bd3491aa1c390dc0293b117f3ea6f60d2e20d59101c882e31eda0460de896de37151f8e76c81a11881ab6563025ed51c8f50a2e759e7d830a8d2ea9ca8d652ccc8117f8a80c6858f3ee1d7e73c9be9b2e2ce32be4f7c9fcbd70899924560d7cc0241f37d00a58ecfaff722836bda10dac107e0a5dd3146587355dc6d8aa99dee3312df219395a65b3be8bf9ec813e84e030c82c5d700e0c829050bd9605b499cdbd73850b8999a5b61bce23267e388294f3b03410b84d3d9490fce69deaaaa98bc31f5e6afdde96717224f3954ae235bd5dd995cfe4118fa90e5f0d791ae04cc04bf95c6d32bba35ef49e7f82aaee2683b142e2c075e18744fa85406e3b1917a106d528f185833ba48d98bb8062d463557758677c4dd0471923a4750c6f63f795f4059ead9382b4a956adfed17d133e7e4269c3a832d951415927d5c645c25f75b793c265bddab57b70aad96ad383ae990614b1a869e62774917a71c63c0fa730ab267493145792bc1bd81a9e7e07708addb60090c3391c885ea698f169c963ef955a33a189805d177e0f6d20fe9bb581f869b4a770c3d6d0d93caf31d9a2cac8e0614b5d9ce7e8f3dcb5963acc77b3be9b43e36a02ec131e5fbd9b59be1f8c10a67396b5c702d072df2cb6adb4c46c68a368b1de5af5c188ba6b8d2bf85d43e96ad21efa18d8bee62a46244db287e1017fe7b59cea2dd9796673b19919f4ced9d649e2bf14d5cb1b0b57eedaf35ff7f5b5ce0b4ba10da8a88d4dc53420f0f50ddc624a6f916e7946acb8e71642396273c08ef997d7696d16fcbbf3cd66ba244649a749abba41574ecf1a7361f3007ee223f800cb00580c2685234154770020c3d8cf7435b8bb8264db0ea17455ef80734c1eac8b15cddcfc36b44509b2f5158080d0456eaa20f9b276e162ec971144979e93cb7ac98668a0857d55d611c49162fe129439e2119d7329b11f9bb17efeea01aa30262d03fbd2ccf0641dd92a0c19a665f7d67e58572413e4bfe4b7e78d4d0eb8e739ff75c4be0d576402366da49dc6e2babddcc724e01594c60c7c68d70581bc265c29380b4150f264f2abd0b87a06dc8046026dd45ff2b5e1a950be676027ecf488b1f52693a8dce7b9b00789d055d6709daf52a2b7ce1f24c2d6a597158275157002e7668a9ea11af2e4bee3d7a4d8fe07990c068429655de8e9cb0567260f8c7a26c614929930297aa11a6d8e3dbb69f867a29a122bc86af767086ddea299f2d9c6398eb1f85033e9229d5493d6a55d1b752ddca5afe74b51c4cebd6e259599bf7e823ec6ceec6674e4951ec0a30f03696aa8f60c2b80df03dc904cd6c67a49ad173d8935073c643ed580c7b06246e8eaa7888e06f51aa0107f0a31a653f219d8e2322d78542ead6a11b74324fae07420801bea8d48649b359415d5532e001c7c20ddb86ca42cf9146533f182a3d4fc74e5716bb36a159bec2a5287ba5ddf8a5424ad33ddb5a04867a2b7cf55888ab62c8257192b343ec7a7fbdb617706b7498b73b49689d56e85efabbba7963edc0f640fcf825fab60f3d72831222791c226bd0f974b7708c0a3fa8c55939974fd02350f3ad8a953bc8e32edf7886d0db204349374ec56075aecefa2eda5e9808587142b949f341a72829c5835df2bed41804491777295f2acf12b2e287cccca2f593ad8902d8d911156c704e14081c44f899ebf49c76c00f46eae23a18691c8efc1155694581785f4714ecbba66f43f13b8be1964a44945e074d692b5993a03289952a41d63afc9f4572514edb4ba48b71eb12a05ee99b68f7154b6d5a5bf48f6b6406924fd740cb2c174bb2d032a9dfb3a90ffb0a039b1af76259cd92b51a939595562183965946aa5835137d6a1975f106d23735002b332b96cbd834a23c9b43c7c2c88c3d65f7ba7242d7ab19c97bfaca353409994f52beab7afe1240aeab1dfa38bf668c794c23298b1f40cdcfc2a9cbd16f6698bb0ed8ee424f82308689cd11b6c407e73dadee997874ca0dd0c9f951894fbac17ed7f579525cd155fe7cda026853b8c40b8e4dd59c675449943a485f7ea3b02a99f3b881dde269329f1d14394ad11fb019c37f971d76f6a710c35e51db9991df7a98e064ab5fc5b9f32b2a26050067ed4c22e3416b06954a10bc5ca2e74bfd3f6954f08279e31d3158f9660772cde75a260690f8680cee015090e5871db11641a9549b4afbd23252c46e335f301bcc23d7d34ca10d94cab6057435eadc70871827ffffebd564d97b7cf4d08ad7101adf9a48041c16c83876b457223dc7d006faed74c5b6330a10cf392f023313a0259203157d51ea0826dc55de1d0f635e98978f6cec12c456b375c106119333100d87064f2d292dbb454e04f61a1f20f9c612d1462dcf0eb43473b264c4f414d50efc4c9891a1cc53bcceeef8a1caaffcaf3b538ae18ca52fdf09d910e7b7248d5d1b6f3b30e94b1b3fe31e6ba331cfe49497937364513f6792454cf28a861b94a334e63a53d023011884ed54eddc291616cda412e35f771b90a13ecb8c9a293dda650c4d5a378367ac56bc27f43862deaec9622f9487d6b13954489d08f1072b9def54d01fcb99606112fdd3d42c28ae8b63ee1cbbab9350d4fdd9d8bf4ce5a5d2021cc18e2d4cb0970519a47b25702a68e6b1bc59d7f523be911fe63419296108a1bc9e9057fff4a100a543b6c6de3627e4a047bd5c9fce7d84a70b6b57c4544ff785b77a36079040007599d17275136a504ad6bd4abb3228b67e336695a85953881555540a38963e06f860ab31ef4140c0f14b95c97f92a6c5ee6bd7cb54f9c40092b2dc06837a5addf119f5bc619a2dc6118c5d694aff28111cfbe629687dde622f65c6436385649bc6289fd66de56bb59c282ba5ab72e941010907c33dab95ba28c09731d2c3e90a1f3536301cb0af5023b06876d354d97c1bdc01627fb051054538b15667a940ec50da0ff02e0138b777ba727ebbd3268a360b845a120847a20e4959cd7949b4f91cb6ec39067cc88ebebba60a5d2167235f65f7cc77dee5502dc050f092c23a117f9914020e90d02ab170467a6bc4d69ca0b36372d2395264f84c0ba9941eda5acf5b66c373a0580b4044f2a9da006b3c32894917b14545fe84f185bb08148c30e618c3a75ce49c6d76a195632b346e3e1d24b52dedc6c50af9de2c72898d0201d286a9bb45660fa85a3d4eb5cdd71f628d560874231852a47f24a968f4bb63256f1ee586ef768561353fad7fd4a5d86d05b7b75d8c661a373163b4a5e45bf8f2cb53cd6cb00ffe1e8bfc01de92455211280ca47e52703ea9edca3287b5222fdad53320f20e2100ff6bffb6ee1454ecefe96d5d2524d9b83f52f96f5ace145067ecc637ea8d668a249a632e1bb531ad14ce7cbd976071666678b922f1593bac0db4f7b9bc48a5173d1ed6f2abceaaa5ad1df8090b326534f7355d8e9af28cf47473827da7c2233bcf512b23bacdc7e0b5da9495cd9bcb00de94599cac03206d10efa1fa60dc1727f202e16bb3db278dc2f1e797a67510f8c9297cf8fb66aff60909b4050a69dee49f1b7f191b8197aaa2fdfe62965578a1f8e961abd1dab1bb2d94df1004a6974db84b5fc40bed1c188935522634ec33dea4eb14c6c4026248024bc4a152e3c52e07f18708f83d2f4cbb8c13d46b994ac39c5f84aff4787c8d2ddab07e346e1ae48a85e13ae0b45ac70b596beae2607f6331b680d945aaecc924578c868c5b04983c7f6826b44046574c49c708b92dffe74705b0a57340f8be3c74567b495ac276efdeef0b596010cfc27995168cc46b06665b4dd231f1dec1292827cd450f561030f809cfb6333015922ef322ae5c095a454f68c00009299833f58cc8f30df1ccd786ad038be112fffa71918119b5acf18a65bdc1649bd784ea83ba404f9005d00363de3d7d6423d2c4ec9c043e09dab6f77bad1ca0d897b9fd427b4a40529d57f02f687eb3ab1497f5e40e65593022abd6f2b191827e07a1d34f2224be1b36d63be7529151590e2b256bbc5e4990e5edda94d874bdffbd39f7a93dffd81e15dcdabaa3586006ed4959bf95b294416bf8d2dea5fc6bf7e6c1f02360aa19c1ed03890814de0c2382d34717763b4e49b2a16a2889bf85af6b21c147556f062e865ae53799b5b80afed73fcbf23505316236a7ed104e7b657bd76f28bfdef533c7e0ef547ceda16b58a3cf5120a41d4b8129184238df49a92a025fad98793fdc72e45306a070f669f838ca2d41d5299f63a3d3e8464079afe907a03e31017dcafc9f2f2c7e09eff78f7cbe06a7aedea7ba92d32f8208c80bbbca1cd281035c7afd7a579209041dcfa5a58860f7c38f6936b1b33f67a2fdbd95f586d79996d020e62ebdc74f306f265dcce04d74682cb6aa289a0451f6f625bc55b0a56913bfc77415f11a65f0ea25e61f6cddcd83776db506845153569f5214ad50996d0871523b262c2e363343def3beff0abdf1a43c0bb32cee9201964259e31d6ba64ea800b4d7995d36e03b0cf07082d53834b7233f5db41aeda3a93c4e0d02c7cf45f014c1096c96fd73f7fe6bb4a37531a604ec5f1412898c925f94484a97e66d25ef3d1d5f18bc30e45b2b0760459f926b97816bd6ddb350c142b2101c0ac110235891258f2da151cc85176af37cf6655bca504a591cd25ca4e2f6221429bfe5b870516d1b10e85c0b515cccd81785abab2522f4d8a16ecf8c39250712ca7aae49c47f9ad6aaa01751818f860d203dd482a74da3fabced3fd62478122865956bbd81959f60e16cee6ffe015418fbd830cc474f1a9f2adf6506be15c2450bac8d769b066e3fd127eb692597a5e8359762e9720e61af0e48042021cf9d9d37c34246ffbab2a94833f9fade73ea79fe987869a70df5bf01ec16e60e8b6e1811cf10e8517a6c4c6a48b2c85fff5ce8680912abaceedcd14775030facf78ddc543c71f066c2ac325931a4ce45a822d74e634c73424128c93aa1c9faf6b97f13392f1e39688fc9959f9ba566dc045eceb88feee16cbb7caf2e758f8174ee061c739f50ac333d01e7790acb0abf7e531c78644f63992c16fe26f6b138b27b1f919b5c755922f11a3e45a861bcd1f10c2a8da504497632c51cf19dd266243672c39d1db34535bb1abcd6ced78a4a4068549a782867db169d2933ec12e291ef10147df2e6dc1fa3970f492fda724aba73363d047a68a9c42cf52dbad0220f3fd7b177ebe08da3efb2e3ae7d32ec92697f1a9dc6829472075a964e2364b59b3da4aaa4eda8a441ea29e547f520dee0188a9e86c22e1f8b2b5b4409f6b7599d24a27f86b62551c85e9a314b222f1fd3bf1509389464ea5d45d9f2a1ecd5fff8427db4b6c64c91007cebe34802165507db72cbb8d32b10ce89991997439b2f51d99fc9c903e564fbc1558bf99df31167625ea9898a74482c4881677f6979078cce2100296cadefce9358913af8a277a43e05568cb5202bcfeeddd092fe23af3c72aee5de787d0a18df53262cee02fb7200730e7397fc8750a1c2180737bf6d83337db3dbe6f69218c40ff3632cad07e8394c5525f87df5c0c62c4b37c06b047a1b8cb4df287d3e7105abd1792121fe2c0946c16e44c2f32ac66cbd4f889229c8b166b3cc4b87642d0e3c7187c54185766a76d60de6c368026b2260b6d5bec09f9047e4de2782186423cf403a7a132a595a3e939508d981f0b5818c34ead662d5b7c94052cb78154f38b629d73b53cd16c8909ed9ba810b11686183273df8416a2b452eb540f6accc111ae90cf3fce83178bd20104bc7ff39354f31b34b66231b515025d0966c3c49088429f598af86129956a5ec3abbb5d9f1afb65801128facd87d2b60c2232eb024898e836b00b9c8b3368e6b03926e896e20e076b79520c5a93af7a4f12d52b8b9436bce93c932fbd27b68fba3f07be49c8ebc3dd81f1fac2356482a25bbf5bed044d6d3fbe3ccb5faf53e7bcd7390c449418015518745d962b7b5057a00f3ac0ba9b8dc2e75d8fd6133ef608089e929aca5c9cbe847847882e423dbaa32ed3afae7d68b35e0582c0305a0e2ebb50e16e1d9792ac4d9a8b745a6faced7c5d027ab67c81326bc9b9d46dc3fdc512896876b1b5b7ffdd5399b2e8d2473b7244d4e05cf9816d7f697575546ebe296821de07bb52b790007c13a36122628c61bb7679fb0d13c5785d97147ff8a84b3427ed939186dfdfb74c2ce2f93301f8a515c537f89c12c184f997a16cb4a7413101fdebeeb770e7163b3add4b154a0328f4ebbb7bf65ecbbff7daaea5bcbefb81817ea85562bef78bf471e1ddb982de52ac168c1baf3999b181c7d401b15bd94b3fe17dfecebfea32c250dd5badd8efe1e96caa5d4f0ee8a43ac59736f6ae06c80a09f2c4298f772c77ab58b3c415617010402af3accc02365d1cb5b24255b929c1bcd38db1e81cd2e2b1a43f0f3443bcec40329a1e0f4ce271c1e6d995e6112a3152c90c2ec55c80d283235168ab842c214778d947abe28eee79d637a43a2785c912ea8bc215015f601bd3e69c4953f97ad2ea712d92016ec2706faa32f5ad04d8ea3c88aa4b2a9747f7f23425dd8ddb7a55da0f31002c2cd7a9afbdcf41a9c47d7bdeaf5e149b4234169433108c33b627d654d4d992d71fce931bfa72a527a4c51cdbfe14588cc1f0d4c7a785b8c74e58ae62d575e5864a10ae13f9ab8ac81bcf10407d85c7b91b97014489d0e11f52614d9090a6dac33e08958c526365c9cdc5911f5c122defbe901b6595a48803667449161329df237fe26ba427e1cbe2d65888cc2f2af1153c4053322b78667aa5d544d0f7e97cba68df1dd86d4da824fcfaa777214fc5352cf1013721095a876f5d3b3f8e85b310ac6cf87d107247ed66bc8550b5ba12eb67a68ce75ca7ad31e6dfeab0146adb09e7e82a5f54ddbe6e27944be3dd62147623953c840d3d6774d8b3afaaad3ff71c3b65afcf74612a04189ecb8576f4cacb07be5cdb67a1e252588d0cc85e722b70fc4b2789e97515e4d35adc0c3a8155ddfc706cca634623987f00e6021b6fbc66d40280ffb3f2e5f12721b4ad03344c35e6529027672a3860c856a62f421a8406ae482e44e86a387c802b1e5c59c2da9605986b6f642e1f0b9364aa42debf7e4cbe7ec4b0dcdd80f294022a5bebf0f7ed19f4bd6903c1408641897b50f5d690e801624ef8e2398595aa67dfba9a5e960d352a4f7598f4b8116b769033c52af1e4b7b41cea9620569d408c36f2ee1e2e8476072382f3cd7bc490aef1d1335e178b13a1f819868d0a06a49a1de95139fcf3f155e369310b3b9b0de98ea936ff90ed28e8209bb70ba161be2f9beb1222b7752180b6fe7183ead34af6339fb0d0e67cc2b93d12465714b9522ef8bb2d76e433026df9dac81c74471d67e5064ec9ef5acab80d818cb06e88be97657a23600cd1baebd6e7aca2510435d887db8346a063073c802ddcefcedb55202b77eebd8d5c3ae1e7d7488f9113bb1feac71244f8f9b39d802db0ba32341957ea712ff904251dce8522b6053c49c0fd1a8ff0e07f65d31f910daebdbc23542c79e6f4d35721ace6399570da58c232be966acad27e5303e57012161995f0fed4685cdfd5dea48c9293d022c1d6804b2f104c6cf964f19f41c929357aad497dbe894454ff7c23395706c1f3e0bd40577b5471c5a6572040329f82e45763635652023096cdf75faa157ab065c1b7dad884331934a934c2e48e8fe42e2345a3e7e4bafaa9dd12ca6b0aedbfe4379f09019e3f2b49cb3f8fa90bffec7b1c4eedaea7185e307e5de855010058799e7df34d175158ebf52d0f0f372e2b9beb5677b5aa5364a64b4814df611089bf5f63333e2fd57c47a570f8b717f33448a6aa352fa879fff3d7706dd7335aa704b29d2469f92e3b37cb1126d7cfe0fa3c3b28858c943454b23431ad1f03fab7012edccb4c8cc59b670f97c432c264e5b74b7648260f1e20fd35345216fb45e4616be23e68a3bc64c411a0fe38c08441a9d1aa1175c9e93a1ca27001eee4be97884fab1e7cb4178433f1fd44fb0f2e23cbec43286fd858b28c430165333b9ad8d80f68fae2f80f6238b463719f1d7c0ba1476f7f803e83cbf1768803b28484d60

Creating toggles

Toggles can be used anywhere in the help center, but often they are used within article content. Our extension allows you to create toggles in several different ways, none of which require you to copy-and-paste any HTML.

The Toggles extension is bundled into all of our themes by default, so you can start using it straight away. The source code can be found within the extensions.(min.)js file in the theme’s Assets folder.

When creating or updating an article using the Zendesk article editor:

  1. Create a numbered (Add numbered list button) or bulleted list (Add bulleted list button) using the editor toolbar and add the content that you’d like to see in each tab within the list items.

  2. Click the Source Code (Source code icon) button in the editor toolbar to view the source code of the page.

  3. Add a class name of .js-toggles to the list element to convert it into a set of interactive tabs.

  4. Add a title attribute to each list item containing the title you’d like to use for the tab. Alternatively, you can apply a class name of .toggle-heading to an element within the list item and that element’s text content will be used as the tab title.

     <ul class="js-toggles">
       <li title="The first toggle title">...</li>
       <li title="The second toggle title">...</li>
       <li>
         <h3 class="toggle-heading">The third toggle title</h3>
         ...
       </li>
     </ul>
    

The Toggles extension allows you to convert a standard ordered (<ol>) or unordered (<ul>) list into an interactive set of tabs using JavaScript:

<ul class="js-toggles">
  <li title="The first toggle">...</li>
  <li title="The second toggle">...</li>
  <li title="The third toggle">...</li>
</ul>

<script type="text/javascript">
  ready(function() {
    each('.js-toggles', function(el) {
      new Toggles(el, {
        // Options go here
      });
    });
  });
</script>

Options

Options can be passed via data attributes or JavaScript.

Name Type Default Description
initial number -1 The index of the toggle to open on initialization.
accordion boolean false True if the toggle group should behave as an accordion.
activeClass string 'text-primary' The class name(s) to apply to an active toggle heading.
template string
null
null The name of the template to use.
templateData object {} Additional data to provide to the template rendering function.

For data attributes, append the option name to data- and use kebab case instead of camel case.

Events

Class Properties
toggles:render Fires when the toggles markup has been rendered and inserted into the DOM.

Related extensions

Animations and transitions Free

Animations and transitions

Add engaging animation and transition effects to elements.

Carousels Free

Carousels

Present content in well-defined and easy to follow steps.

Content blocks and icons Free

Content blocks and icons

Display icons against categories, sections and articles.