KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I wrote the following jquery javascript stuff $(document).mousemove(function(event) { var element = event.target; $(element).css("border","black solid 1px"); }); $(document).mouseout(function(event) { var element = event.target; console.log( "1 = "$(element).css("border-color") ) $(element).css("border","0px"); console.log( "2 = " + $(element).css("border-color") ) }); It basicly draws a frame around a hovered element. When running this in chrome the output of console.log( "1 = "$(element).css("border-color") ) is "" i.e. nothing. The same is true for console.log( "2 = "$(element).css("border-color") ) . But I'd expect black. I also tried borderColor which does not work either. Anyway when hovering an element a frame is drawn around this element as I would expect. Why then does the output give nothing in return?
Tags (comma-separated)
Save Edits
Cancel