Personally, I’m a big fan of ways to save time when coding, especially when it comes to common interface elements and features. Having used various CSS frameworks before I have just started to include the Bootstrap framework, made by a couple of Twitter employees. Let me share with you why. Read More »
Javascript
An iPhone 4 Built With Pure CSS3? Yep, it is true!
I came across this cool project earlier this morning. Someone has spent time and modeled a full iPhone 4 complete with a working home button, sleep/wake button and lock screen slider using just HTML5/CSS3. No images or svgs. Just javascript and CSS3!
Of course it is completely useless but it does prove just how powerful these new technologies are getting and let’s face it: It’s pretty cool!
Custom Safari Topsites Preview like iCloud, Is it possible?
Today I want to highlight a little javascript that was lifted from the iCloud source code by nikf.org, in order to try and duplicate the custom logo that iCloud gets in the Safari topsites feature. Personally, I haven’t gotten this snippet to work on any website, which leads me to believe there is something else going on in here.
However, you should try! Here is the code which detects the purpose of the loading of the page and sends you (if it is previewing your page) to a custom HTML page that has the custom preview logo.
<script>if(window.navigator&&window.navigator.loadPurpose==="preview"){window.location.href="https://www.icloud.com/topsites_preview/"
};</script>
Javascript Snippet: Go to Site Selected in Drop-down Menu
Once in a while I need users to be able to select an option in a drop-down menu and have the option load a URL directly. This isn’t possible with just HTML alone but with a quick little javascript function, this is easily achieved.
