0

Drupalサイトに、テーブルのようにソートされた入力を含むWebフォームがあります。長い説明をうまく表示するのは難しいです。助言がありますか?

4

1 に答える 1

0

これは、ラベルに折りたたまれた説明を添付するために作成したものです(ノードの説明として追加されました)。

<script type="text/javascript">
    $(document).ready(function(){   
        $(".form-item:has(div.description)").children("label").append(function(){
            $(this).parent().children('.description').hide();
            return '<sup><a href="#" onclick="$(this).parent().parent().parent().find(\'.description\').toggle();" title="'+$(this).parent().children('.description').text()+'"><strong>?</strong></a></sup>';
        }); 
    });
</script>

ここのサンドボックス:http://jsfiddle.net/eapo/3ubec/

他に何か提案はありますか?

于 2013-02-05T22:52:23.140 に答える