Q:

Why does jQuery selector "$("*").not" not work? 

I tried to write this function:

$( "button" ).click(function() {
$("*").not(".one").css("color", "blue");
$(".one").css("background-color", "blue");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<button>Button</button>

<p>g7z8h7u9jiokp</p>
<div>fdklfjöalsdkfdksla</div>
<p class="one">should have a black font color after button click</p>
<p>djkflöadjsdfklfösadj dfnasdkl</p>
<div>fdklfjöalsdkfdksla</div>
<p>jiorpojiweopk w</p>
<span>ijokp 4rwerw</span>
<span class="one">should have a black font color after button click</span>
<p>ijokp 4rwerw</p>
<span>ijokp 4rwerw</span>

Unfortunately, it doesn't work.  I want to except the blue font color for all elements with the .one class. 
How is it possible to fix that? 

A:

The code $("*").not(".one").css("color", "blue"); won't change the font color of the <p class="one"> tags, but it will change the font color of the parent tag, which will cascade down to all <p class="one"> children, thus affecting them. 
Try changing your code to $("p").not(".one").css("color", "blue");

A:

In general, you should never use $("*") as that includes all dom elements in the page including html, head, style and script tags, and changes all of them might create an undesired behaviour in the app.  Also, if your page has lots n lots of elements, then transversing the full DOM might also take some time.  You should best use a parent container and then you can use all children elements and its descendants like:
$("body *")

Demo:

$("button").click(function() {
  $("body *").not(".one").css("color", "blue");
  $(".one").css({"background-color":"blue", "color": "white"});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<button>Button</button>

<p>g7z8h7u9jiokp</p>
<div>fdklfjöalsdkfdksla</div>
<p class="one">should have a black font color after button click</p>
<p>djkflöadjsdfklfösadj dfnasdkl</p>
<div>fdklfjöalsdkfdksla</div>
<p>jiorpojiweopk w</p>
<span>ijokp 4rwerw</span>
<span class="one">should have a black font color after button click</span>
<p>ijokp 4rwerw</p>
<span>ijokp 4rwerw</span>

