javascript - Fade entire page except certain class -


I want to break the ambiguity of the whole page by leaving a certain class on page load. (Timer)

I will be able to enable it in my current code.

If the elements you do not want to fade, then they are direct descendants of the body, Can be done in one line:

  $ ("body"). (": (Not .nofade)") fadeOut () fadein (); .. One ???? //             If the elements that you do not want to fade, they are the offspring of other elements, I'm not sure how you do it, because when the parent elements disappear So they take their children with them ...  Edit:  It has happened to me that there is a better way to go about this: to fade in and out of the elements Instead, a blank (white background) d Iv put it on the entire page and fade it to cover all other elements except those with ".nophed" people. Enter ".nofade" elements with a high  z-index  empty device:  
  & lt; Style & gt; .cover {status: absolute; Top: 0 pixels; Bottom: 0 pixels; Left: 0 pixels; Correct: 0 pixels; Background color: white; Z-index: 1; Opacity: 0; }. Nofed {status: relative; Z-index: 2; }a???? & Lt; / Style & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ("& lt; div / & gt;") AddClass ("cover") .appendTo ("body"). Sammet ({obscurity: 1}, 1000). Delay (300) .mate ({opacity: 0}, 1000, function () {$ (this) .remove ();});}); & Lt; / Script & gt;   

Demo:

Comments