jsplugin 생각보다 쓸일이 많아서 정리해본다.
Checkbox plugin
check box 사용 선언
$('#tree').jstree({
'plugins' : [ "checkbox"],
// etc..
})
check box check된 항목들 가져오기
// get_checked ([full])
// true 인경우 모든값 return, 아니면 id만 리턴
$('#tree').jstree(true).get_checkted(true);
// or
$('#tree').jstree(get_checkted, true);
check box 전체선택
$('#tree').jstree("check_all");
check box 전체선택 해제
$('#tree').jstree("uncheck_all");
Drag&Drop plugin (dnd)
$('#tree').jstree({
'plugins' : [ "dnd"],
// etc..
})
plugins에 추가만 해주면 드래그 앤 드롭이 가능하다.
Contextmenu plugin
https://raon0229.tistory.com/126
jsTree 우측 클릭 메뉴 Contextmenu plugin
jsTree 항목을 우측 클릭했을때 나오는 메뉴들을 구현해보았다. 대충 이런 모습 소스는 대략 아래와 같다. $('#tree').jstree({ //plugins에 contextmenu 추가 'plugins' : ["contextmenu"], 'contextmenu' : { "items": function(
raon0229.tistory.com
Types Plugin
길어서 아래글에 정리해놨다. 👇
https://raon0229.tistory.com/121
jsTree 아이콘 변경 및 분류 (types plugin)
jsTree에서 폴더와 leaf 를 분리해서 보여주고 싶다면 혹은 여러 타입의 정보를 tree 구조로 보여주고 싶다면 type plugin을 사용하면된다. jsTree plugin 공식문서 ↓ https://www.jstree.com/plugins/ jstree jsTree is j
raon0229.tistory.com
Grid Plugin
길어서 아래글에 정리해놨다.
2023.02.03 - [WEB/js] - jsTree grid plugin (jsGrid) 사용법
jsTree grid plugin (jsGrid) 사용법
jsGrid jsTree에 grid plugin 사용해보기로한다. 사실 이것저것 기능을 넣었더니 화면이 잘 깨져서... 조금 안타까웠다 ㅜㅜ 기본 사용법 plugin에 선언, gird에 내용을 입력한다. $('#tree').jstree({ 'plugin' : ["g
raon0229.tistory.com
'WEB > js' 카테고리의 다른 글
jsTree grid plugin (jsGrid) 사용법 (0) | 2023.02.03 |
---|---|
jsTree 우측 클릭 메뉴 Contextmenu plugin 사용법 (0) | 2023.01.31 |
jstree 활용 및 함수 정리 (0) | 2023.01.31 |
jsTree 아이콘 변경 및 분류 (types plugin) (0) | 2023.01.30 |
댓글