Curtis Timson

Front End & .NET Developer

Page 3 of 3

Check javascript function exists before calling it

On large applications, there may be some instances where you need to make a call to a function which belongs in a different javascript file. There might also be a case where this javascript file isn’t always included on every… Continue Reading →

Creating a new rule for a CSS class in jQuery

In jQuery, to add a new style to all elements which have a particular CSS class, we can simply call a function like the following: <div class=”foobar”>Lorem Ipsum</div> <div class=”foobar”>Dolor sit amet</div> function SetFooBarRed(){ $(“.foobar”).css(“background-color”, “red”); } This will add… Continue Reading →

How to prevent self-closing elements in XSLT

If you are to put an element into XSLT without any child elements, the element will automatically close itself. Therefore, if you have the following markup: <div class=”clear”></div> XSLT will automatically render this as: <div class=”clear” /> This is fine… Continue Reading →

Using jQuery callback functions

I’ve heard questions in the past regarding how to run a script after a jQuery animation or event has been completed. The majority of these believe that you need to delay the script for a few seconds, allowing the animation… Continue Reading →

Strongly typed Stored Procedure names in C#

Calling SQL Stored Procedures in ASP.NET as simple text strings can cause problems such as: Typo in Stored Procedure name. This isn’t a huge issue, but it can be costly if you later need to rebuild the application because of… Continue Reading →

Newer posts »

© 2017 Curtis Timson — Powered by WordPress

Theme by Anders NorenUp ↑