Javascript (15)

Google map in hidden bootstrap tab fix

Fix google map rendering when showing bootstrap tabs $(‘a[data-toggle=”tab”]’).on(‘’, function(e) { if ( $(‘href’) == ‘#map’ ) { doMap(); // your map init function here google.maps.event.trigger(map, ‘resize’); } });

Custom Dropdown in CKEditor 4

Need a custom dropdown in CKEditor 4? I’ve created this plugin, you can download strInsert from the

linking to internal pages using ckeditor 4

It’s functionality that already exists in other editors such as tinyMCE, i am surprised that linking to internal pages using ckeditor cannot be acheived in an easier (native built-in) way. So, when i develop CMS’s for various clients, i always use CKEditor, and 9 times out of 10, the client needs to link to internal […]

fetching wordpress posts using google feeds api

Building my new website (again) and decided to feed one of my existing blogs to it, using javascript to pull in the content after the main page has loaded, usual style… i decided to use the google feeds api for fetching wordpress posts. here’s my html: [code] <div id="feeds"> <h3>From Tizards Briefcase</h3> <div class="feedBox" data-url=""> […]

jquery 1.9 – adding handlers after dom load

Just started a project using jQuery 1.9 and immediately got stuck with adding handlers to elements that are created after the dom has loaded, i simply did: Prior to jQuery 1.9, adding a click (or any handler for that matter) to an element after the DOM has loaded used to be a matter of using […]

WordPress-like slug generator

I’m building a site for a client at the moment that needs to be able to control the URLs for each of their pages (including sub pages etc), we need a WordPress-like slug generator! So, I came up with this, which i imagine is very similar to WordPress achieve the same thing (essentially stripping out […]

bxSlider loses width when hidden & resizing the window

A bit of a title that: bxSlider loses width when resizing the window while bxSlider is hidden. Problem: bxSlider loses width when hidden. Exactly. I have a header in which i have a bxSlider (using a ul lists of li’s), this header is toggle-able (show/hide) by the user. When the user hides the header (and […]

css gradient builder

Found a great plugin – ClassyGradient, and it’s great. really great. exactly what i was looking for, for a new project. i have extended it to allow checkboxes to choose which lines of css to output (with or without each of the proprietary prefixes). as i was integrating, i needed to update the output after […]

Google Analytics for Tracking Hash URLs

It’s surprisingly simple to use Google Analytics for Tracking Hash URLs really. I needed to track each “page” as it was viewed, but being a hash url driven website of course google analytics (by default) only recognises the “index”, seeing as its essentially a “one page website”. No good to anyone… So a simple one […]