EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: essco on October 16, 2014, 05:30:00 PM



Title: my own icon in the top bar of window (panel>)
Post by: essco on October 16, 2014, 05:30:00 PM
Hello coders....

Anyone got any idea on how to place an icon in the header bar of a window.  I can get one there if I make it a 16x16 png and place its address into the icon.css document.  This way does not allow me to "easily" build a page on the fly.  Any help would be appreciated.

Charlie


Title: Re: my own icon in the top bar of window (panel>)
Post by: jarry on October 16, 2014, 06:43:10 PM
You can find the '.panel-tool' to get the tools container. Append your icons to it. Please try this code:
Code:
var tool = $('#w').window('header').find('.panel-tool');
var a = $('<a href="javascript:void(0)" class="panel-tool-a"></a>').prependTo(tool);
var img = $('<img></img>').appendTo(a);
img.attr('src', '../../themes/icons/help.png');