Here we examine why you would use a protocol relative URL.  Have you ever had this error in ie – “This page contains both secure and nonsecure items?” A protocol relative URL may also be called a “network-path reference” or “scheme-relative URL.” If your page is through HTTPS protocol, then it will request the assets be through HTTPS protocol also.  If an asset is requested through HTTP on an HTTPS page it will throw an error.  The error is “This page contains both secure and nonsecure items” error.  This is where the protocol relative URL can help. Continue reading


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


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


jQuery $(document).ready() is a basic part of using jQuery. The jQuery document ready function executes when the DOM (Document Object Model) is completely loaded in the browser. jQuery document ready is used to initialize jQuery/JavaScript code after the DOM is ready, and is used most times when working with jQuery. The Javascript/jQuery code inside the $(document).ready() function will load after the DOM is loaded, yet before the page contents load. This is important for “events” to work correctly. Using $(document).ready(), your events can happen before the window loads.

Uhhhh…. So….

To get jQuery to work,

Continue reading