$.fn.dataDisplay

$.fn.dataDisplay

$.fn.dataDisplay - A jQuery plugin that aids the developer in writing concise conditions against elements within a form based setting, in order to control the display of elements based on the state of the form.
Version:
  • 0.0.2
Author:
  • Graham Dixon - gdixon@assetinfo.co.uk
Source:

Examples

Basic HTML syntax and structure example:

<div id="container">
    <input name="inputTest" type="value"/>
    <div class="dataDisplay"
        data-display="
            {inputTest} is equal to 'testing';"
        data-display-resets="
            $this.css('display', 'none');">
        <a>Test</a>
    </div>
</div>

Basic JS initiation example:

$(function() {
    $('#container').dataDisplay({...});
});

Classes

DataDisplay

Methods

dataDisplay(options)

$.fn.dataDisplay - Initates a new DataDisplay instance or invokes methods against instance bound to the $el
Source:
Parameters:
Name Type Description
options object the settings being applied to this $el
Name Type Description
funcs array provide an array of func methods to extend the built-in helper methods
eventName string name to bind the events against
dataAttr string bind DataDisplay instance to data attribute
condsAttr string main attribute holding the conditions on first-load
resetsAttr string attribute holding resets (defined as jquery statements against $this)
initFire string should the plugin fire during the setup phase?
keyEventsFire string should the plugin fire on key events?