10 10 / 2011

  • NowJS creates a magic namespace “now”, accessible by server and client
  • Functions and variables added to now are automatically synced, in real-time
  • Call client functions from the server and server functions from client

05 10 / 2011

AJAX Callbacks In jQuery - AJAX at it’s simplest

So I was thinking, what would I have liked to have known sooner in my formative AJAX explorations? A little snippet that would’ve got me on my way quicker.

The first thing that jumped out at me was making the most of the callback in jQuery’s load() function. Probably the simplest way to get some great AJAX interactions happening in no time.

So how is it done? Here goes:

$(‘#mydiv’).load(‘your/path’,function() {

// Whatever you want to happen when the load is complete here

// I like to go for sliding or fading in the content you’ve just pulled in, for instance

$(‘#mydiv’).fadeIn();

});

That’s all there is to it - just drop in an anonymous function as the second parameter with your effect on the element.

(Source: api.jquery.com)

Tags:

Permalink 1 note

23 9 / 2011

Create web pages that are reactive to video content.

17 9 / 2011

$ is not a function

For those writing Wordpress plugins, as I am at this present moment, and stumbling upon the Firebug error message “$ is not a function”. Try swapping all the $ signs for jQuery.

So $(‘.class’).show(); would become jQuery(‘.class’).show(); 

Same goes for document ready.

Long story short, it’s down to a conflict with multiple jQuery instances.

15 9 / 2011

(Source: observando)

Permalink 1,259 notes

12 9 / 2011

Codeigniter Vs Wordpress

Not a lengthy comparison, rather a brief observation. 

After working solely with Codeigniter for a while it’s amazing how bulky and cumbersome Wordpress now seems - which compared to something like Drupal is even more staggering. Though I suppose that’s the difference between using a framework and a generic CMS.

Horses for courses and all that, but I’d take rolling my own lightweight solution over hacking a CMS to death any day.

12 9 / 2011

tumblrbot asked: WHERE WOULD YOU MOST LIKE TO VISIT ON YOUR PLANET?

The summit of Everest, or Antarctica.

11 9 / 2011

This is the new site that is now live for SetupDraw - setupdraw.com

This is the new site that is now live for SetupDraw - setupdraw.com

08 9 / 2011

Opening Shot

Ta da! I have a blog…