{title ? title : null}

Set default option for select menus in Angular 2+


I recently needed to add a `please select` default option for <select> menus with a null value. There is a lot of confusing information out there for what should be a simple task, so here […]

{title ? title : null}

Widths and Heights in Javascript


Widths and heights can be a bit of a minefield in JavaScript and jQuery here is brief overview: Heights Object Code Type Description document.body.clientHeight JavaScript Inner height of the HTML document body, including padding but […]

{title ? title : null}

If element exists jQuery


If you need to test whether an element exists n jQuery using a selector? I have found this little snippet of code very handy so thought I would share how it’s done here. Just replace […]

{title ? title : null}

Disable CSS stylesheet with JavaScript


Use the following code to disable a style sheet using jQuery. [js] var styleSheets = document.styleSheets; var href = ‘’; for (var i = 0; i < styleSheets.length; i++) { if (styleSheets[i].href == href) { […]