The example in this article describes the jquery implementation of a selector instance that does not contain the current item. Share it with everyone for your reference. The details are as follows:
This code demonstrates jquery selecting all links. When one of the links is clicked, the other links will change color, and only the current link will not change color
var $allLinks = $("a"); $allLinks.click(function() { $allLinks.not(this).css("color", "red"); });
Readers who are interested in more content related to jquery selector can check out the special topic of this site: "Summary of jquery selector usage"
I hope this article will be helpful to everyone’s jquery programming design.