7 Let's .focus()! passed in IE


#1

Codes:

$(document).ready(function(){
    $('input').focus(function(){
        $(this).css('outline-style', 'solid');
        $(this).css('outline-color', '#ff0000');
    });
});

Tested in full window but the outline was thin and baby blue.
But after I accidentally clicked on the input, the outline turned into red and solid.


#2

@arrayplayer55687 Do you have a question about the exercise?


#3

I think that the original coment here is informing that the above code works in Internet Explorer too, the script in 7 / 12 implied it was only needed on Firefox (this is the outline-style to get it working in firefox).

I hope this helps other people doing this great thing called learning.


#4

2 posts were split to a new topic: 7. The input turns blue, not red


#5