textaccordian(jquery)(代码片段)

author author     2022-12-02     769

关键词:

<!DOCTYPE html>
<html>

<head>
    <script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>
    <script>
        $(document).ready(function () 
            //jQuery event handler for clicking any h2 inside the accordion div. 
            $('.accordion h2').click(function () 
                //If the item they just clicked is hidden...
                if ($(this).next('section').is(':hidden')) 
                    //...hide all dropdown panels.
                    $('.accordion section').slideUp('fast');
                
                //Toggle the paragraph below the term that was clicked.
                $(this).next('section').slideToggle('fast');
            );
        );
    </script>

    <style>
        /* Container for all terms and definitions */

        .accordion 
            background-color: #eef;
            width: 800px;
            max-width: 98%;
            margin: 1em auto;
            border: solid 1px #555;
            border-radius: 5px;
            font-family: Verdana, Tahoma, Sans-Serif;
        

        /* Each item inside the accordion container. */

        .accordion div 
            box-sizing: border-box;
        

        /* Heading at top of each item. */

        .accordion h2 
            margin: 0;
            padding: 8px;
            background: #aec6cf;
            font-size: 1.1em;
        

        /* Section within each item */

        .accordion section 
            margin: 0;
            background-color: white;
            overflow: hidden;
            display: none;
        

        .accordion section p 
            margin: 1em;
        

        /* hide section under h2 */

        .up 
            height: 0;
        

        /* Extend section to full height */

        .down 
            height: 100%;
        
    </style>
</head>

<body>
    <article>
        <!-- Start all accordions -->
        <div class="accordion">
            <!-- Each item is a div with an h2 first, and section second. -->
            <div>
                <h2>First item with clickable top</h2>
                <section>
                    <!-- For best results, content in each section should be coded with p or other tags. -->
                    <p>Content here</p>
                </section>
            </div>

            <div>
                <h2>Second item with clickable top</h2>
                <section>
                    <p>Content here</p>
                </section>
            </div>

            <div>
                <h2>Clickable Top the Third</h2>
                <section>
                    <p>Content here</p>
                </section>
            </div>
        </div>
        <!-- End accordion -->
    </article>
</body>
</html>

20180503jq学习记录(jquery操作样式表,时间片,jq对象函数间传递)

 jquery操作dom对象  1.1 动态添加及删除一个dom对象      添加: var新对象=document.createElemente("标签"");          $(对 查看详情

markdown放代码片(代码片段)

查看详情

csharp一片空白(代码片段)

查看详情

csharp一片空白(代码片段)

查看详情

markdown交易迁移-分析片(代码片段)

查看详情

代码片--练习匿名内部类

packagecom.dreamy.day04;/***@authordreamy*需求:*补足代码,通过匿名内部类。*/interfaceInter{voidmethod();}classTest{//补足代码,通过匿名内部类。/*staticclassInnerimplementsInter{publicvoidmethod{System.out.println("methodrun");}} 查看详情

phpacf中继器阵列片(代码片段)

查看详情

代码片|水波纹(代码片段)

N年前的代码片分享packagecom.example.myapplicationimportandroid.animation.AnimatorSetimportandroid.animation.ObjectAnimatorimportandroid.content.Contextimportandroid.graphics.Canvasimportandroid.graphics.Colorimportandroid.graphics.Paintimportandroid.os.Handlerimportandroid.os.Looperimportand... 查看详情

csharpgenerateintablelistwithfilteringgroupingandorderingfromdatabaseinopenpresentationformat.cs(代码片

查看详情

代码片-策略模式+工厂模式(代码片段)

通过策略类实现不同场景的策略处理,通过工厂模式创建不同的策略对象1.策略实现接口、策略实现类1.1策略接口/***策略接口*/publicinterfaceIWarnRulepublicvoidwarn();1.2策略实现类/***防拆告警策略实现类*/publicclassAntiRemovalWarnimplements... 查看详情

代码片-策略模式+工厂模式(代码片段)

通过策略类实现不同场景的策略处理,通过工厂模式创建不同的策略对象1.策略实现接口、策略实现类1.1策略接口/***策略接口*/publicinterfaceIWarnRulepublicvoidwarn();1.2策略实现类/***防拆告警策略实现类*/publicclassAntiRemovalWarnimplements... 查看详情

代码片-策略模式+工厂模式(代码片段)

通过策略类实现不同场景的策略处理,通过工厂模式创建不同的策略对象1.策略实现接口、策略实现类1.1策略接口/***策略接口*/publicinterfaceIWarnRulepublicvoidwarn();1.2策略实现类/***防拆告警策略实现类*/publicclassAntiRemovalWarnimplements... 查看详情

代码片--写一个异常

packagecom.dreamy.day04;/***@authordreamy*需求:老师用电脑上课*开始思考上课中出现的问题。*比如问题是:*电脑蓝屏*电脑冒烟*要对问题进行描述,封装成对象。**可是当冒烟发生后,出现讲课进度无法继续。*出现了讲师的问题,课时计... 查看详情

ucoiii时间片轮转调度(代码片段)

前提:时间片轮转法:主要用于分时系统中的进程调度。为了实现轮转调度,系统把所有就绪进程按先入先出的原则排成一个队列的队首进程,让它在CPU上运行一个时间片的时间。时间片是一个小的时间单位,... 查看详情

003_时间片轮转调度及中断函数(代码片段)

(一)使用时间片轮转调度功能条件(二)在os_cfg.h头文件中将OS_CFG_SCHED_ROUND_ROBIN_EN置一#defineOS_CFG_SCHED_ROUND_ROBIN_EN1u(三)调用OSSchedRoundRobinCfg函数,在start中调用这个函数#ifOS_CFG_SCHED_ROUND_ROBIN_EN//当使用时间片轮转的时候//使能... 查看详情

错误处理:oneofthevariablesneededforgradientcomputationhasbeenmodifiedbyinplaceoperation(代码片(代码片段)

RuntimeError:oneofthevariablesneededforgradientcomputationhasbeenmodifiedbyaninplaceoperation:[torch.cuda.FloatTensor[1,100]],whichisoutput0ofUnsqueezeBackward0,isatversion5040;expectedversion5039inst 查看详情

sqllistadosdeclientesconinformaciónsobrelaprofocióndebolsitashigiénicasdeporvida:(代码片

查看详情

sqlactualizacióndeladescripcióndeestructuraparalasecciónderegistrodecalificacione(代码片

查看详情