EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: r2ferna on March 10, 2015, 06:22:06 PM



Title: How to change the combobox border-color?
Post by: r2ferna on March 10, 2015, 06:22:06 PM
This line works fine!
Code:
$('#filtroAv').css("border-color", "red");
This line does'nt works!
Code:
$('#inpField').css("border-color", "red");

The second line is for a combobox.

Code:
        <input id="inpField" class="easyui-combobox" style="width:100px;"
            data-options="valueField:'clave',textField:'etiqueta',panelHeight:100,
                data:[
                    {clave:'r-apellido',etiqueta:'Apellidos(s)',selected:true},
                    {clave:'r-nombre',etiqueta:'Nombre(s)'},
                    {clave:'r-confirmacion',etiqueta:'Confirmación'},
                    {clave:'r-nreser',etiqueta:'Folio',tipoDato:'integer',tipoBusqueda:'unica',},
                ], value:'r-apellido',onSelect:cbOnSelect,validType:'inList',selectOnNavigation:true,"
        ></input>
       <a href="javascript:void(0)" id="filtroAv" class="easyui-linkbutton"
            iconCls="icon-search" onclick="openDialogFiltro()">Avanzada</a>

MTIA.
Fernando.


Title: Re: How to change the combobox border-color?
Post by: stworthy on March 10, 2015, 07:51:00 PM
Call the function below to change the border color for a special field.
Code:
function changeFieldBorderColor(field, color){
var t = $(field);
var el = t.data('textbox') ? t.next() : $(t);
el.css('border-color', color);
}

Usage example:
Code:
changeFieldBorderColor('#filtroAv', 'red');
changeFieldBorderColor('#inpField', 'red');


Title: Re: How to change the combobox border-color?
Post by: r2ferna on March 11, 2015, 06:51:24 PM
Thanks a lot stworthy!!