2017-11-29 5 views
0

html 노드 구조를 변경할 수 있습니까? 환언fancytree html 노드 구조 변경

<span role="button" class="fancytree-expander"></span> 
<span class="fancytree-title"> 
    <div class="title">Direction Générale des Services</div> 
</span> 
<div class="agents"> 
    <span class="agent">Directeur Général des Services<br>Jean-Marc Lucas<br><i class="fa fa-fw fa-phone"></i>&nbsp;:&nbsp;02 96 13 59 59<br><i class="fa fa-fw fa-envelope"></i>&nbsp;[email protected]</span> 
</div> 

<span role="button" class="fancytree-expander"></span> 
<span class="fancytree-title"> 
    <div class="title">Direction Générale des Services</div> 
    <div class="agents"> 
     <span class="agent">Directeur Général des Services<br>Jean-Marc Lucas<br><i class="fa fa-fw fa-phone"></i>&nbsp;:&nbsp;02 96 13 59 59<br><i class="fa fa-fw fa-envelope"></i>&nbsp;[email protected]</span> 
    </div> 
</span> 

, 상기 span.fancytrre 타이틀의 outsite HTML 노드를 추가 할 수있다?

+0

, [당신의 코드 조각을 포맷] (https://stackoverflow.com/editing-help) 적절한 들여 쓰기는 사람이 읽을 수있어 편리합니다. – hnefatl

답변

0

들으 특히 createNoderenderTitleFancytree events 한 번 봐 되세요. 예 : 향후

function createNode(event, data) { 
    // add fake <input/> to the node 
    var $input = $("<input/>").val(data.node.title); 
    $("span.fancytree-title", data.node.li).before($input); 
}