js/foundation/foundation.js
function (el) {
        var opts = {}, ii, p,
            opts_arr = (el.attr('data-options') || ':').split(';'),
            opts_len = opts_arr.length;

        function isNumber (o) {
          return ! isNaN (o-0) && o !== null && o !== "" && o !== false && o !== true;
        }

        function trim(str) {
          if (typeof str === 'string') return $.trim(str);
          return str;
        }

        // parse options
        for (ii = opts_len - 1; ii >= 0; ii--) {
          p = opts_arr[ii].split(':');

          if (/true/i.test(p[1])) p[1] = true;
          if (/false/i.test(p[1])) p[1] = false;
          if (isNumber(p[1])) p[1] = parseInt(p[1], 10);

          if (p.length === 2 && p[0].length > 0) {
            opts[trim(p[0])] = trim(p[1]);
          }
        }

        return opts;
      }
function (el) {
        var opts = {}, ii, p,
            opts_arr = (el.attr('data-options') || ':').split(';'),
            opts_len = opts_arr.length;

        function isNumber (o) {
          return ! isNaN (o-0) && o !== null && o !== "" && o !== false && o !== true;
        }

        function trim(str) {
          if (typeof str === 'string') return $.trim(str);
          return str;
        }

        // parse options
        for (ii = opts_len - 1; ii >= 0; ii--) {
          p = opts_arr[ii].split(':');

          if (/true/i.test(p[1])) p[1] = true;
          if (/false/i.test(p[1])) p[1] = false;
          if (isNumber(p[1])) p[1] = parseInt(p[1], 10);

          if (p.length === 2 && p[0].length > 0) {
            opts[trim(p[0])] = trim(p[1]);
          }
        }

        return opts;
      }
function ( el ) { var opts = { } , ii , p , opts_arr = ( el . attr ( 'data-options' ) || ':' ) . split ( ';' ) , opts_len = opts_arr . length ; function isNumber ( o ) { return ! isNaN ( o - 0 ) && o !== null && o !== "" && o !== false && o !== true ; } function trim ( str ) { if ( typeof str === 'string' ) return $ . trim ( str ) ; return str ; } // parse options for ( ii = opts_len - 1 ; ii >= 0 ; ii -- ) { p = opts_arr [ ii ] . split ( ':' ) ; if ( / true / i . test ( p [ 1 ] ) ) p [ 1 ] = true ; if ( / false / i . test ( p [ 1 ] ) ) p [ 1 ] = false ; if ( isNumber ( p [ 1 ] ) ) p [ 1 ] = parseInt ( p [ 1 ] , 10 ) ; if ( p . length === 2 && p [ 0 ] . length > 0 ) { opts [ trim ( p [ 0 ] ) ] = trim ( p [ 1 ] ) ; } } return opts ; }
parses data-options attribute on nodes and turns them into an object
parses data - options attribute on nodes and turns them into an object