簡體   English   中英

在HTML中使用Java腳本無法展開/折疊

[英]Expand/collapse not working using java script in html

這是鏈接http://jsfiddle.net/susxK/124/當我單擊客戶服務時,未發生任何事情可以幫助我解決此問題。

預期輸出:

clicking the  customer services i want to show the full table.In the same way collapse. 

這將顯示和隱藏您的桌子

$(document).ready(function() {
    $(".form-matrix-table").hide();

    $(".form-label,form-label-top").click(function() {
         $(".form-matrix-table").toggle();
    });
});

只需將onclick =“ name()”偵聽器添加到您的html代碼中即可:

工作演示:小提琴

的onclick = “d()”

HTML

<label class="form-label form-label-top" onclick="d()" id="label_5" for="input_5"> Customer Services </label>

CSS

#cid_5{
    display:none;
}

JS

function d()
{
         $("#cid_5").fadeToggle();
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM