RSS Feed: Ajax Bestiary

AJAX Development, News, Techniques & More
last modified on Saturday, 19 June 2010 1:43PM

RSS Feed Feed download link: http://feeds.feedburner.com/AjaxBestiary

  • Date.js My New Favorite Javascript Date Library, published on Saturday, 19 June 2010 1:43PM
    Earlier this week, I discovered that Safari doesn’t support dates in ISO 8601 UTC combined format:  “2010-06-19T03:11Z”.  This was a problem as my production system was delivering me a json file with dates in this format and my project was simply a new UI for the existing server.  A quick round of googling found DateJS [...]
    http://www.ajaxbestiary.com/2010/06/19/date-js-my-new-favorite-javascript-date-library/
  • How to Write a jQuery Plugin, published on Wednesday, 09 June 2010 9:00PM
    I know there’s a slew and a half of tutorials on this out there, but I’m adding my own to the mix.  I’ve been working on a generic template for plugin development and have cobbled together what I feel is a solid one. First thing first, however, building a plugin is about being a good citizen You’ve [...]
    http://www.ajaxbestiary.com/2010/06/09/how-to-write-a-jquery-plugin/
  • Getting and setting values for jQuery widgets, published on Friday, 11 December 2009 10:30PM
    If you come from an OOP background you’re likely used to defining class variables like this: class MyClass { var internalValue1; var internalValue2; function constructor() { … } } The values which are to be stored in your object are simple, straightforward, likely to be typed, and the compiler will detect [...]
    http://www.ajaxbestiary.com/?p=397
  • Constraining a numeric value to a range, published on Wednesday, 09 December 2009 6:00PM
    Okay, so this doesn’t strictly have anything to do with any JavaScript library, but it’s a handy little snippet of code to keep in your arsenal. val = Math.max(cMin, Math.min(val, cMax)); In one line of code, we’ve automatically constrained val between cMin and cMax. Note that if cMax and cMin are reversed (cMax is less than cMin) [...]
    http://www.ajaxbestiary.com/?p=393
  • Event handling in jQuery widgets, published on Tuesday, 08 December 2009 6:00PM
    This is simple – provided you understand that the reference the keyword this refers to changes depending on when it is called. When called during initialization, this refers to the widget you’re initializing. When the event itself is triggered, this refers to the DOM node node and not the widget. As such, we need to introduce a [...]
    http://www.ajaxbestiary.com/?p=390
  • Customized context menu handling with jQuery, published on Monday, 07 December 2009 10:26PM
    Can you think of some times you might want to disable the right click context menu? Or better still, insert your own behavior or application specific context menu? This is a simple and useful trick: element.bind('contextmenu',function(e){ //Optional customized handling here return false; }); If you don’t return false, the normal context menu will [...]
    http://www.ajaxbestiary.com/?p=384
  • Helpful error handling in jQuery, published on Wednesday, 02 December 2009 10:10PM
    If you’re going to build a reusable tool, you’re going to want to be able to detect, handle and report error messages in a nice, clean way. It will make you and any other dev happy. The cleanest way of handling genuine errors for developers using your tool – namely, invalid input sent to a function [...]
    http://www.ajaxbestiary.com/?p=378
  • Custom stateful jQuery widgets, published on Tuesday, 01 December 2009 12:28AM
    The widget library included in jQuery UI is pretty cool, but sometimes you need to roll your own custom object. If it didn’t have to be reusable, you could always just use a whole slew of bind methods on a specific page. Likewise, if network bandwidth and latency weren’t an issue, you could just store everything server-side and make heavy use of XHR.
    http://www.ajaxbestiary.com/?p=370
  • Cross Site Scripting – the new old way, published on Tuesday, 20 October 2009 11:02PM
    Cross Site Scripting (XSS) is a big security no-no. It’s never supposed to happen, because as we all know, any script operating within your page has full access to the entire DOM of the page. Then again, there is so much functionality that we want to implement without reinventing the wheel. Marketing departments want to use [...]
    http://www.ajaxbestiary.com/?p=361
  • Using the jQuery data method as a local datastore, published on Thursday, 15 October 2009 11:37PM
    At some point, we all have to store datasets on the client. We can clutter the namespace with ever more variables and try really hard to avoid collisions. We can cram variables into some local object that we’re using in the normal execution of our script anyway. We can attach custom attributes to HTML nodes, [...]
    http://www.ajaxbestiary.com/?p=346

RSS Feed Feed download link: http://feeds.feedburner.com/AjaxBestiary