User:N0one/Sandbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Tag: Reverted
Line 2: Line 2:


''Sandbux''.
''Sandbux''.
<!--
// This will give an element a special button only when 'data-collapsetarget' is set (id of an element),
// the special button will collape/expand the an element
$(function () {
    $('.mw-collapsible-toggle[data-collapsetarget]').on('click', function () {
        var target = $(this).data('collapsetarget');
        var $target = $(target);
        if (!$target.length) return;
        $target.toggleClass('mw-collapsed');
        $target.find('> :not(.mw-collapsible-toggle)').toggle();
    });
});
-->
<div class="mw-collapsible mw-collapsed" id="myTestBox"><p>This is the hidden content.</p></div>
<span class="mw-collapsible-toggle" data-collapsetarget="#myTestBox" style="cursor: pointer;">Toggle Box</span>

Revision as of 12:51, 17 April 2025

To User:N0one/Sandbox/template for template testing.

Sandbux.

This is the hidden content.

Toggle Box