jquery - Remove visability on <li> tags except (this) on hover in a menu -
According to the topic, I can call each It should be very easy for me, but I can not understand it. This is my markup: And here jQuery (which does not work): Something's wrong ... Thanks! & lt; Li & gt;
$ (document) .ready (function () {$ ("li"). Hover (function () ($ ("li a") No. (this). CSS ("Visibility", "hidden");});});
Your
.not (this) will not work because this is a li element but you are selecting an element. You can do it like this (added code to monitor hover):
$ (document) .ready (function () css ("visibility "," Hidden ");}, function () ($ (" li "). Hover (function () {$ (" li a "). ($ ('A', this) {$ (" li a "CSS" ("Visibility", "Visible");});}); In addition, you have a typo in your HTML - a should be
Comments
Post a Comment