Рубрики
HTML JQuery

task.jQuery «:focus selector»

Ссылка

CSS

.css2207031228 {
    background-color:red;
}
/*color,color контент*/

JS

bo52.f[2207031228]={
    arg:[{name:'el',title:'element'}],
    data:(p)=>{let ID=2207031228;let OBJ=bo52.f[ID];ARG=fun_arg(p,OBJ,ID);

    $(ARG.el).delegate("*", "focus blur", function() {
        let el = $(this);
        setTimeout(function() {
            el.toggleClass("css2207031228", el.is(":focus"));
    },0);
});
},tegs:"el.color.border",title:"color el"}

HTML

<div id="el">
<div tabindex="1">test1</div>
<div tabindex="2">test2</div>
</div>