jQuery (9)


Google map in hidden bootstrap tab fix

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

Read more...



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 […]

Read more...



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="tizardsbriefcase.com/feed"> […]

Read more...



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 […]

Read more...



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 […]

Read more...



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 […]

Read more...



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 […]

Read more...



Postcode Anywhere Address Lookup Callback

The new Postcode Anywhere configurator is easy to setup, mapping their address fields to your form fields is as easy as using a nice simple interface – the greatest of ease! Trouble is with this way, there is no way of using a callback i.e when i have successfully selected an address from the select […]

Read more...



jQuery UI slider change step above certain values

I needed a way to change the step increments on my jQuery UI slider when the value was above a certain number. For instance, I have a range slider from £0 – £2000. Steps of £10 increments are needed until the user slides up to £200, where the step should change to £100 increments. jQuery […]

Read more...