Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- In Oxygen Builder, set the close button attribute name to 'onclick' and value to 'myFunction()' without the quotes.
- */
- function myFunction() {
- /* --------------- CLOSE SECTION WITHOUT FADE OUT -------------------*/
- var x = document.getElementById("section-86-2").style;
- x.display = "none";
- /* ---------------- CLOSE SECTION WITH FADE OUT -----------------------------
- var s = document.getElementById("section-86-2").style;
- s.opacity = 1;
- (function fade(){(s.opacity-=.1)<0?s.display="none":setTimeout(fade,40)})();
- */
- /* --------------- REMOVE THE SECTION COMPLETELY FROM DOM without FADE OUT ------------------
- var x = document.getElementById("section-102-2");
- x.parentNode.removeChild(x)
- */
- /* ------------- REMOVE THE SECTION COMPLETELY FROM DOM with FADE OUT --------------
- var s = document.getElementById("section-102-2").style;
- var x = document.getElementById("section-102-2");
- s.opacity = 1;
- (function fade(){(s.opacity-=.1)<0?x.parentNode.removeChild(x):setTimeout(fade,40)})();
- */
- /* ----------------- Set cookies expiration at the end of browser session ----------------- */
- document.cookie = "section-advert=section-advert-1";
- /* --------------- Set cookies expiration to 1 day (replace 1 with any number of days) ----------------------
- document.cookie = "name=section-advert; max-age=" + 1*24*60*60;
- */
- }
Add Comment
Please, Sign In to add comment