php - How to display appending data without refresh in tree -


this tree view

enter image description here

i have done when right click tree name(for example ,asset, non current , shah) , click add head there come jquery dialog form , add head code , head name , saved in mysql database using codeigniter frame work in php.

basically , created subhead under head.

i need when after submitting, display subhead under head without refresh tree. example ,

if create subhead under asset append subhead after "104-kamrul" without refresh , display without change.

how can solve it, please suggestions?

i think need ajax make need, use specific class each tree parent example:

<div class="parent-1"> <div class="child-1"></div> <div class="child-2"></div> </div> <div class="parent-2"> <div class="child-1"></div> <div class="child-2"></div> </div> 

now load need following parents classess:

$('.parent-1').children('.child-1').load('http://site.com/url/to/load/new/childs'); 

or

var _childs = $.get('http://site.com/url/to/get/some/childs'); $('.parent-1').append(_childs); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -