Node.js – Ajax Pagination without the Pages

Published on Oct 15, 2012 by Jamie Munro

With my recent endeavours into Node, I thought that taking a fun article like this one - CakePHP 2-0 Ajax Pagination WITHOUT The Pages – would be a really fun experiment to see how difficult it would be to accomplish in Node.

At the end of the day, the logic is still the exact same, retrieve the items, determine the max length, calculate the number of pages, and then perform AJAX as well scroll down to fill in more content as-needed.

Leveraging the Express API and Jade templates, this is quite painless to implement into Node.

Read more >

Tags: AJAX | jquery | pagination | JavaScript | jQuery | node

Using Jquery to Check a Checkbox

Published on Sep 27, 2012 by Jamie Munro

This is an excellent follow up on a recent post – Determine if an element is visible with Jquery – because in that post we use the is Jquery operator to check if an item is visible or hidden.

Spoiler alert, in this article, we can leverage the exact same function by altering the value of the selector passed into it.

Read more >

Tags: jquery | attr | prop | is | jQuery

Determine if an element is visible with Jquery

Published on Sep 26, 2012 by Jamie Munro

When I interview web developers, I always like to ask the following basic Javascript question:

Write a function in Javascript that will ‘toggle’ or show/hide an element upon being fired.

function toggle(elementIdValue) {


I typically see one of two answers: Jquery or classic JavaScript.  Both of course are effective.  But, in this article I'm going to demonstrate another way as well.

Read more >

Tags: jquery | visible | hidden | toggle | jQuery

A Fancier Twitter Timeline

Published on Sep 25, 2012 by Jamie Munro

I truly enjoy the finer things in life.  For example, if I'm going to eat a steak I don't want some fatty low grade piece of meat.  I would much rather (in this case, spend the additional money) to get an AAA grade of meat.  The taste is worth it.

The same is true with development; the Twitter Timeline is "nice", but I personally don't want a linear, scrollable representation of my Tweets!  I want the AAA grade where in this case it just takes a little bit more time instead of money…  As you can see above, my Tweets are sliding in and out every 7.5 seconds.  Once it cycles through my latest 10, it restarts again.

Read more >

Tags: setInterval() | twitter | JavaScript | jQuery | Twitter | timeline

PhoneGap and Jquery Mobile – A Truly Winning Combination

Published on Sep 11, 2012 by Jamie Munro

Any regular readers may have noticed that I finally got around to updating and adding a new book under "My Books" on the right-hand side of the screen.  Yes, I not-so recently published my third book (and second with O'Reilly) earlier this year.

The book is called 20 Recipes for Programming PhoneGap – Cross-Platform Mobile Development for Android and iPhone.  Throughout this book, I get you up and running quickly using the PhoneGap API along with the Jquery Mobile API to take care of the pesky mobile design issues.

Much like I did when I released my MVC 3.NET book, I provided a free chapter from the book for my readers.  Well here is an excellent recipe sample from my PhoneGap book.  The goal of this recipe is to provide a standard approach to automatically fire (or trigger) a JavaScript function when a PhoneGap page has loaded – either on initial launch or after the user has navigated within the application.

Read more >

Tags: jquery | phonegap | android | blackberry | PhoneGap | jQuery | iPhone

Maintaining the back button with AJAX

Published on Dec 28, 2010 by Jamie Munro

Jquery vs Prototype/Scriptaculous

Published on Mar 26, 2009 by Jamie Munro

Drag and Drop with AJAX Example

Published on Feb 14, 2009 by Jamie Munro