EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arma on December 17, 2015, 08:31:19 PM



Title: Filebox clear button
Post by: arma on December 17, 2015, 08:31:19 PM
Hi,

How to add additional button to filebox to clear filebox value ?

Thanks


Title: Re: Filebox clear button
Post by: stworthy on December 18, 2015, 08:29:57 AM
Attach a 'clear' icon to the filebox. When clicking on it, call 'clear' method to clear the filebox.
Code:
$('#fb').filebox({
    icons:[{
        iconCls:'icon-clear',
        handler: function(e){
            $(e.data.target).filebox('clear');
        }
    }]
})