[問題] jQuery Simple Tree +Drag'nDrop
關於這個jQuery的plugin使用上有點問題
http://plugins.jquery.com/project/SimpleTree
demo
http://news.kg/wp-content/uploads/tree/d&d/
問題是要是我想在node上加上<a></a>標籤,點擊它是不會跳轉的
,大概是因為jquery.simple.tree.js有重設click event的關係吧?
,那我要怎樣才能回復它連結的效果?
比如說這樣,加上<a>標籤:
<ul class="simpleTree">
<li class="root" id='1'><span>Tree Root 1</span>
<ul>
<li id='2'><span>
<a href="tw.yahoo.com" target="_blank">Yahoo!</a>
</span>
<li>
</ul>
<li>
</ul>
這個是它的使用範例:
<script type="text/javascript">
var simpleTreeCollection;
$(document).ready(function(){
simpleTreeCollection = $('.simpleTree').simpleTree({
autoclose: true,
afterClick:function(node){
//alert("text-"+$('span:first',node).text());
},
afterDblClick:function(node){
//alert("text-"+$('span:first',node).text());
},
afterMove:function(destination, source, pos){
alert("destination-"+destination.attr('id')+" source-"+source.attr('id')+"
pos-"+pos);
},
afterAjax:function()
{
//alert('Loaded');
},
animate:true
//,docToFolderConvert:true
});
});
</script>
--
ˍˍ
人一旦有了掛念,做什麼事都會特別小心。 ▕天險▏
人總以為人定勝天,但很多事情,人卻輸在自己。▕刀藏▏
 ̄ ̄
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.227.131.79
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章