Everyone farts. And now your web pages can too.
Everyone farts. And now your web pages can too. Include "fartscroll.js" in your page. You can include the latest version straight from our CDN: <script src=" Initialize the fartscroll plugin after the page has loaded: // Fart every 400 pixels scrolled in the window fartscroll(); // Fart every 800 pixels scrolled fartscroll(800); // Fart every 100 pixels scrolled (probably a bit much) fartscroll(100); // Now I'm just adding more examples to make the page longer fartscroll(50); // SO MANY FARTS fartscroll(5); // I should register fart.io for this fartscroll(500); // I should register fart.io for this fartscroll(400); // Dammit, fart.io is taken fartscroll(600); // Alright, that's probably enough examples fartscroll(400); SHAMELESS PLUG: Want to work on technology that changes the world?
How can I create a pyramid from using php
PHP: Turning multidimensional arrays to single dimension arrays
How to Create a Time Based CSS Style Sheet Switcher
Style switchers have become a popular feature on websites these days. CSS style sheets allow a Web Designer to change the look and feel of a website with little effort. Some sites use "Day" and "Night" type of style switchers that automatically change the site theme based on the time of day. This tutorial shows you how to create a time based CSS style sheet switcher using PHP that lets you change multiple style sheets at once at specific times of the day. Why PHP instead of JavaScript? The one drawback to using PHP for a time based CSS style sheet switcher is that the time is based on either the web hosting server or on a "time zone" set in the script. When I was building my personal portfolio site, I created a time based style sheet switcher using JavaScript and jQuery. JavaScript heavy websites can have problems with conflicts between various JavaScript scripts. Before We Begin The code used in the tutorial creates a basic CSS style sheet switcher and you can view the demo here. if elseif
Change CSS style based on time of day using jQuery | James Minshall
I wanted to build a site that was responsive to the time of day. My idea was to have the background shift gradually throughout the day to reflect whether it was day, sunset or night. I originally used one coded in PHP, however, since PHP is a server-side language the theme would change based on the time for the server rather than the user. After realizing I needed to use Javascript in order to get the user’s local time instead of the server I spent some time Googling various tutorials trying to find a simple solution to this problem. <script> // Change background depending on user’s timefunction applyclass(){var d = new Date();var n = d.getHours();if (n > 19) // If time is 7PM or later apply night theme to ‘body’$(‘body’).addClass(‘night’);else if (n > 16 && n < 19) // If time is between 4PM – 7PM sunset theme to ‘body’$(‘body’).addClass(‘sunset’);else // Else use ‘day’ theme$(‘body’).addClass(‘day’);}window.onload = applyclass;</script> Here are some snapshots of the site in progress:
KAPsNotes/README.md at master · kapilsharma/KAPsNotes
Related:
Related: