Posts Tagged ‘jQuery’

Grab HTML fragment with AJAX

Thursday, December 3rd, 2009

If you’re new to AJAX you may be wondering how you can pull in just a single element from another HTML page (as calling an HTML page with AJAX pulls the entire HTML content in as a String).

It has also been explained to me that the particular solution I’m going to discuss here is the same technique used by the jQuery library.

(more…)

WordPress jQuery ‘undefined’ Error

Sunday, September 27th, 2009

This is just a quick post on an issue I found while testing the open-source WordPress blogging software (www.wordpress.org).

It seems quite a few people over the years have asked for help (mainly on the WordPress forums) to fix a particular JavaScript error which causes their WordPress administration system to break, but it seems that after researching this issue myself (as I also was struck down by this JavaScript oddity) that there were NO useful answers or resolutions.

(more…)

How to add useful utility methods to JavaScript

Sunday, September 13th, 2009

If you find in your day to day JavaScript work that a particular method or function is missing from the core language you can always just add it in yourself by taking advantage of the prototypal nature of the JavaScript language and modifying an object’s hidden prototype property.

Every object has a prototype property which links to an empty object. By adding methods to this hidden object you can augment the original Function.

(more…)