2013-02-05 2 views
0

drupal 사이트에서 나는 webformtable-like sorted inputs을 가지고 있습니다. 긴 설명을 멋지게 표현하기는 어렵습니다. 어떤 제안? 여기Drupal Webform 항목 설명이 멋지게 표시됩니까?

<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/

다른 제안

답변

0

이 내가 설명을 첨부했다 (노드 설명으로 추가) 레이블 붕괴 무엇인가?

+0

drupal 7을 사용하는 경우 document.ready 대신 drupal 비헤이비어를 사용해야합니다. – 2pha

+0

고맙습니다.이 유틸리티는 drupal 6입니다. – eapo