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

JavaScript - Search a string for a substring JavaScript - Search a string for a substring

Published on Feb 15, 2019 by Jamie Munro

Problem


You want to search a string variable to determine if it contains a matching substring value.

Solution


Read more >

Tags: JavaScript | substring

Set Cursor Position of textarea with JavaScript Set Cursor Position of textarea with JavaScript

Published on Feb 14, 2019 by Jamie Munro

In the following example, I will create some basic functions to allow you to set where the cursor goes inside of a textarea or <input type="text">. Let's dive right into the core JavaScript code:

Read more >

Tags: JavaScript | setSelectionRange | createTextRange

JavaScript - Remove a specific element from an array JavaScript - Remove a specific element from an array

Published on Feb 7, 2019 by Jamie Munro

Difference between location.href and location.replace Difference between location.href and location.replace

Published on Feb 9, 2018 by Jamie Munro

Retrieving query string variables with JavaScript Retrieving query string variables with JavaScript

Published on Feb 8, 2018 by Jamie Munro

Zero Padding a Number with JavaScript Zero Padding a Number with JavaScript

Published on Feb 7, 2018 by Jamie Munro

ASP.NET MVC 5 with Bootstrap and Knockout.js ASP.NET MVC 5 with Bootstrap and Knockout.js

Published on Apr 21, 2015 by Jamie Munro

Javascript, the Back Button, and Windows Phone 8 Development Javascript, the Back Button, and Windows Phone 8 Development

Published on Feb 18, 2013 by Jamie Munro

Node.js Versus Nginx: Bare Bones Test Node.js Versus Nginx: Bare Bones Test

Published on Dec 4, 2012 by Jamie Munro

Node.js Versus Apache2: Bare Bones Test Node.js Versus Apache2: Bare Bones Test

Published on Dec 3, 2012 by Jamie Munro

Node.js Ajax Pagination without the Pages Node.js  Ajax Pagination without the Pages

Published on Oct 15, 2012 by Jamie Munro

Node using Jade Templates with Express Node using Jade Templates with Express

Published on Oct 8, 2012 by Jamie Munro

My First Node Application My First Node Application

Published on Oct 4, 2012 by Jamie Munro

A Fancier Twitter Timeline A Fancier Twitter Timeline

Published on Sep 25, 2012 by Jamie Munro

JavaScript: Easy Creation of "Countdown Timers" JavaScript: Easy Creation of

Published on Aug 28, 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

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

Published on Dec 28, 2010 by Jamie Munro

Facebook Development - Quick and Easy Dialogs Facebook Development - Quick and Easy Dialogs

Published on Jun 10, 2009 by Jamie Munro

setTimeout() vs setInterval() in Javascript setTimeout() vs setInterval() in Javascript

Published on May 5, 2009 by Jamie Munro

Jquery vs Prototype/Scriptaculous Jquery vs Prototype/Scriptaculous

Published on Mar 26, 2009 by Jamie Munro

Optimize your CSS and JS with CakePHP in minutes Optimize your CSS and JS with CakePHP in minutes

Published on Mar 21, 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

YSlow - Helping slow web pages load faster YSlow - Helping slow web pages load faster

Published on Feb 11, 2009 by Jamie Munro

Firebug - A developer's best friend Firebug - A developer's best friend

Published on Feb 11, 2009 by Jamie Munro