P
P
Pavel2017-06-03 11:06:28
Layout
Pavel, 2017-06-03 11:06:28

How to tell the js validator that everything is ok?

there is a code

$('input,textarea').focus(function(){
        $(this).data('placeholder',$(this).attr('placeholder'));
        $(this).attr('placeholder','');
    });
    $('input,textarea').blur(function(){
        $(this).attr('placeholder',$(this).data('placeholder'));
    });

the validator warns that there are 2 identical 'input,textarea' selectors, how to fix the code ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dymok, 2018-09-24
@UnluckySerivelha

What if you specify transition: all 0.3s and set all styles from the hover block in the main block with different values?

A
Adik Izat, 2018-09-24
@JaxAdam

put a transition on the hover effect. Otherwise, the transition is applied only when the page is loaded, you won’t even have time to notice it.

&:hover{
transition: 0.1s;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question