Blog

Squiz Matrix jquery.matrix.js Updated to 0.2.8

Mon, Apr. 6, 2009

I have made some updates to the jquery.matrix.js project. The first is a massive code clean-up, making sure all line indents were correct, and helpful commenting was added.

  • jQuery Matrix

Second, matrixForm() has recived some love, and now works with both Asset Builders and Custom Forms. There are also four new options:

  • errorArray
  • errorSource
  • errorMessage
  • onComplete

errorArray

Allows you to capture any form error messages into an array, which is then used to populate a javascript alert dialog, letting you know which errors your form has.

errorSource

Takes a jquery selector, most likely a div that is wrapped around the forms error keyword. This must be used if errorArray is set to true, as it is used to gather the errors for the array.

errorMessage

Allows you to customize the message that appears on the alert dialog.

onComplete

Used when errorArray is set to true. It will fire when there are no longer any items in the errorArray. Essentially, it tells you when the form has finally been submitted. Since this is a callback you can use any normal jquery within the function.

Hope this helps someone out there. Please let me know if you find any bugs as I would be happy to make the fixes right away. Also, suggestions are always welcome!

Nicholas Hubbard
Owner

Add Comment