EasyUI Forum
September 14, 2025, 02:45:13 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: UI Tree  (Read 6184 times)
jlivio
Newbie
*
Posts: 11



View Profile Email
« on: August 07, 2015, 07:33:11 AM »

Hi all

Is it possible to put an image in a NODE from a URL?

Thanks
JL
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 07, 2015, 07:47:27 PM »

You can use the 'formatter' function to render an <img> element on the node.
Code:
$('#tt').tree({
formatter:function(node){
var s = node.text;
if (node.text == 'Photos'){
s += '<img src="http://www.jeasyui.com/easyui/themes/icons/man.png"/>';
}
return s;
}
})
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!