Disable Tooltip Animation in HighCharts JS (v2.2.1)

by justin carlson on 04/24/2012
Here's a quick post to explain the issue (which the Highcharts folks know about and may already be fixing), and how to remedy it.

Styling Checkboxes and Radio Buttons With CSS and jQuery

by justin carlson on 09/22/2010
There are probably a hundred ways to do this, I just wanted a simple drop-in to style check-boxes and radio buttons with basic css. I whipped this jQuery out and it seems to be working well in IE7+, Firefox 3.6+, Opera 10.x, Chrome, and Safari. It supports label binding as well. Oh, and it fails nicely for those that don't use JavaScript. ಠ_ಠ I'm sure it could be reduced further but I don't care to over optimize.  I have not actually used this on a radio button yet, but since the elements operate about the same I'd guess it should just work.

jQuery: Simple example of table row cloning with form element incrementation / renaming.

by justin carlson on 09/15/2010
Someone at work asked about this, putting this out as an example of how it can be done. The question, is there a simple way to dynamically add/remove table rows that may contain form fields that doesn't create name conflicts. This example changes all name and id attributes on cloned rows. It also removes the last td and replaces it with a remove icon that links back to the remove JavaScript. 

dead simple jQuery progress bar plugin

by justin carlson on 05/13/2009
This snippet makes it easy to drop in basic horizontal bars, or progress reports.

     $('#sample').progressreport(100,50,'%1 (%3%) of goal reached.');

$(this) combo box selected options

by justin carlson on 05/13/2009
Simple jQuery snippet to get the selected options from a select box using $(this):
$(this).children(':selected').each(function() {
 // handle $(this) selected option
});

Passing Variables to Ajax Response Handler

by justin carlson on 11/28/2008
If you want to have one Ajax request handler for all your site's requests, or if you're just looking to pass a variable to the response handler, this snippet shows you how ridiculously easy it is. This snipped uses jQuery, but you can apply the same principle to any Ajax call.

Cancel JavaScript Event Bubbling

by justin carlson on 10/05/2008
This is some common sense that I had somehow misplaced.  How to cancel the bubbling of an event with html/js.

Simple isFloat() Function

by justin carlson on 01/01/2007
JavaScript does not provide an isFloat() function.

Here is a dead simple isFloat() example, this works well for most client side quick-checks.

I don't recommend doing client-side validation.


function isFloat(value){

   if(isNaN(value) || value.indexOf(".")<0){
     return false;
   } else {
      if(parseFloat(value)) {
              return true;
          } else {
              return false;
          }
   }
}