End Your If

Helping you solve those tough coding problems!

Learn some great development tips and techniques through recipes that clearly define the problem being solved with a working solution.
Popular Tags: cakephp | theory | optimization | javascript-development | asp-net | ajax | sql | php-development | jquery-development | css

Search:
Follow @endyourif rss Facebook LinkedIn
My Books

Experimenting with the canvas for a basic walk animation Experimenting with the canvas for a basic walk animation

Published on Feb 19, 2019 by Jamie Munro

I don't claim to be an animator, Javascript expert, or anything else; I simply wanted to explore the canvas tag in HTML5. In the following article, I demonstrate how to create a simple walking animation using a free sprite that I found on the Internet.

Before I show the solution, I'm going to start with the finished product. Like I stated, it's extremely basic and not the most overly exciting thing in the world. But from a person who has been creating web applications for 10 years, I found it pretty cool.

Read more >

Tags: JavaScript | jQuery | animation | canvas

Deep clone an object with jQuery Deep clone an object with jQuery

Published on Feb 19, 2019 by Jamie Munro

Problem


You have a JavaScript object and you want to clone/copy it to a new object.

Solution


Read more >

Tags: extend | JavaScript | jQuery | clone

jQuery: Global AJAX Events for Start, Stop, Complete, or Error jQuery: Global AJAX Events for Start, Stop, Complete, or Error

Published on Feb 18, 2019 by Jamie Munro

Problem


Your website contains a lot of AJAX requests using jQuery and you want to add a global event at the start or finish of the AJAX request, e.g. add a spinning icon, or handle all AJAX errors in a particular fashion.

Solution


Read more >

Tags: jquery | JavaScript | jQuery | AJAX

Node.js Ajax Pagination without the Pages 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 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 Determine if an element is visible with Jquery

Published on Sep 26, 2012 by Jamie Munro

A Fancier Twitter Timeline A Fancier Twitter Timeline

Published on Sep 25, 2012 by Jamie Munro

PhoneGap and Jquery Mobile A Truly Winning Combination PhoneGap and Jquery Mobile  A Truly Winning Combination

Published on Sep 11, 2012 by Jamie Munro

Making AJAX Content Loading Prettier Making AJAX Content Loading Prettier

Published on Sep 8, 2011 by Jamie Munro

Improving the speed of AJAX request and response times Improving the speed of AJAX request and response times

Published on Sep 1, 2011 by Jamie Munro

CakePHP 2-0 Ajax Pagination WITHOUT The Pages CakePHP 2-0 Ajax Pagination WITHOUT The Pages

Published on Feb 28, 2011 by Jamie Munro

Creating AJAX Pagination WITHOUT The Pages Creating AJAX Pagination WITHOUT The Pages

Published on Feb 21, 2011 by Jamie Munro

Maintaining the back button with AJAX Maintaining the back button with AJAX

Published on Dec 28, 2010 by Jamie Munro

Jquery vs Prototype/Scriptaculous Jquery vs Prototype/Scriptaculous

Published on Mar 26, 2009 by Jamie Munro

Drag and drop category management with CakePHP Drag and drop category management with CakePHP

Published on Mar 11, 2009 by Jamie Munro

Drag and drop with animations in jquery Drag and drop with animations in jquery

Published on Mar 10, 2009 by Jamie Munro

How to add comments with AJAX in CakePHP How to add comments with AJAX in CakePHP

Published on Mar 9, 2009 by Jamie Munro

Fixing slow drag and drop with scriptaculous Fixing slow drag and drop with scriptaculous

Published on Feb 18, 2009 by Jamie Munro

Drag and Drop with AJAX Example Drag and Drop with AJAX Example

Published on Feb 14, 2009 by Jamie Munro