$.fn.expandableField = function () {
// Multi-context fields
- var returnValue;
- var args = arguments;
+ var returnValue,
+ args = arguments;
$( this ).each( function () {
- var key;
+ var key, context;
/* Construction / Loading */
- var context = $( this ).data( 'expandableField-context' );
+ context = $( this ).data( 'expandableField-context' );
// TODO: Do we need to check both null and undefined?
if ( context === undefined || context === null ) {
context = {
config: {
// callback function for before collapse
- beforeCondense: function ( context ) {},
+ beforeCondense: function () {},
// callback function for before expand
- beforeExpand: function ( context ) {},
+ beforeExpand: function () {},
// callback function for after collapse
- afterCondense: function ( context ) {},
+ afterCondense: function () {},
// callback function for after expand
- afterExpand: function ( context ) {},
+ afterExpand: function () {},
// Whether the field should expand to the left or the right -- defaults to left
expandToLeft: true