Hey all, I've been fiddling with JavaScript and decided to share a neat little thing (its completely useless). Finished Code Code: console.log(+[[-~[]<<~[]][+[]]+[]][+[]][++[[]][+[]]+[+[]]]); //Prints 8 Now for the break down - Pre-note - I use this function while playing with variables. It outputs the value and type of a variable. (The counter is to force the developer console to display each seperately) Code: var counter = 0; ...
console.log(+[[-~[]<<~[]][+[]]+[]][+[]][++[[]][+[]]+[+[]]]); //Prints 8
var counter = 0;
Through the power of CSS3, animation of most HTML elements can nowadays be done without using JavaScript or Flash. Gone too (almost) are the days when images would be blinked on and off with an animated GIF. There are still times, however, when a kitschy garnish can be just the thing to add a bit of festive fun to a normally tasteful web page. There's a time and a place for everything and if we can't have fun at Christmas, well, when can we!? But let's not go overboard. Everything ...
Updated 12-17-2016 at 06:57 AM by Beverleyh
A few months ago I was involved in a discussion on the CSS Tricks forum, where a fellow developer had built some non-responsive website applications. The required minimum layout width was 960px, expanding wider when more space was available, but the min-width had caused issues on iPad where the initial view was zoomed in on its 768 x 1024px screen. I don't have access to the actual problem site, but I recreated the issue on an old non-responsive site of mine that displays ...
Updated 10-28-2016 at 11:59 AM by Beverleyh
If you want a click event (computer, laptop) or a touchstart event (mobile device) to occur when an arbitrary part of your page is clicked on ('touched') but if you don't want this event to occur (or if you want other events to occur) for regions of your page having a certain id or class name, then jQuery is your friend. Code: <script> $(document).on("click touchstart", function (e){ if(e.target.id=='bla'){do this} else {do that} if(e.target.className=='blo'){do ...
<script> $(document).on("click touchstart", function (e){ if(e.target.id=='bla'){do this} else {do that} if(e.target.className=='blo'){do
Building on my previous SiteShow with Controls - Fade-in a list of web pages/URLs as a fullscreen 'SiteShow' blog post, this article shows you how to adapt the scripts to schedule in additional slides for certain times, or specific dates, using PHP. The PHP To start off, using the full-screen demo page as a base, we'll set a few PHP variables at the top of the page to set our local timezone and identify the time, date and weekday; Code: <?php date_default_timezone_set('Europe/London'); ...
<?php date_default_timezone_set('Europe/London');
Updated 09-30-2016 at 10:43 AM by Beverleyh