开发者

Jquery treeview and Ajax

开发者 https://www.devze.com 2023-03-31 17:50 出处:网络
Im using Jquery tree view for a tree structure on my website..The tree structure is big..so initially 10 nodes are displayed and on each click of the (\'+\') more nodes are fetched from the db using a

Im using Jquery tree view for a tree structure on my website..The tree structure is big..so initially 10 nodes are displayed and on each click of the ('+') more nodes are fetched from the db using ajax it is then wrapped in an anchor tag and displayed under the ul > li..My question is when clicking the anchor tag it will redirect to a new page with the initial 10 nodes only (Obvio开发者_如何学Pythonusly yes)..anyway to keep this tree structure as is on the new page ?

Any help techie guys ??

This is what im using http://bassistance.de/jquery-plugins/jquery-plugin-treeview/


If you are willing to prevent your tag from changing the location of your page so that your treeview works fine, then you have at least 2 ways of doing this:

  1. Do not use the a tag if you do not want to link to somewhere else ;).
  2. in the href attribute, write: void(0);

Fake hyperlink

There must be much other cleaner ways of doing this, but at least it works fine. I'd be glad to learn the best way though ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消