css

There are several tutorials on how to make CSS sticky footers, sticky headers, and sticky sidebars.  This is one.  There is a working demo to check out.

Remember to compensate at the bottom of your page.  If your sticky footer is 75px high, add 80px padding or margin so that the sticky footer doesn’t cover the content at the bottom of your page.  The 2 main CSS elements for the sticky footer are position: fixed; and bottom: 0px;

The important thing to understand about  position: fixed; in a sticky footer is that it’s in a fixed position relative to the element or “container” it’s in. Continue reading

Posted in CSS.
Javascript

Two of the three javascript window location object methods seem to do the same thing.  They do not. The window location methods are assign(), reload(), and replace(). The reload() method does what you think. Both assign() and replace() appear to simply open a new page. So…Uhhh….. What’s the difference between javascript location.assign() and location.replace()? It… Continue reading

Javascript

Javascript browser detection can be useful.  jQuery had the function “.browser” which would detect the users browser, but it was removed in jQuery version 1.9. They now recommend “.support” for browser feature detection.

*using navigator.userAgent can make you vulnerable to spoofing.  Here is a lengthy article.

 

So you’re not supposed to detect users browsers using javascript, but here’s how. Continue reading

jquery

This post is for beginners.  It shows how to make a basic jquery UI accordion. We will use a predefined jquery ui for the accordion. There is a link to the demo right before the entire code snippet. Below is an image of the accordion: Image of jQuery… Continue reading