GithubHelp home page GithubHelp logo

jquery-enableable's Introduction

Summary

Allow a UI component (in particular form elements) to be marked as something that could be enabled with explict user interaction. Decouple the feature status from the page markup.

http://www.urbandictionary.com/define.php?term=enableable

Examples

JavaScript

$('.enab1').enableable();
$('.select1').enableable({enabled: true});
$('textarea #my-enable-ta')
  .css('border', '1px solid #888')
  .enableable(
    {
      locked: true,
      display: 'opaque',
      hint: 'Use widget',
      debug: true
    });

HTML

<div class="jq-enableable">
  <h1>.jq-enable</h1>
  <form>
    <input type="text" name="text1"/>
    <div class="enab1" data-enableable="Edit now...">
      <h2>.enab1</h2>
      <select name="select1">
        <option/>
        <option>option1</option>
        <option>option2</option>
      </select>
      <div id="my-enable">
        <h3>#my-enable</h3>
        <textarea id="my-enable-ta">
        </textarea>
      </div>
    </div>
  </form>
</div>

Configuration

  • locked: false
  • enabled: false
  • autorun: true
  • display: disabled (disabled, hidden, opaque)
  • debug: false
  • hint: “Enable” > @data-enableable
  • enable-if-populated: TBD
  • clear-when-disabled | reset-on-disable

Tasks

Design notes and examples

Should be sufficiently small that dependency management isn’t required.

Depends on jQuery since it requires UI component selection.

No templating since the UI components are so small.

No validation since this is a wrapper.

Build through grunt.

No JSDoc processing initially (given configuration pattern).

Nomenclature

Research notes

https://speakerdeck.com/addyosmani/building-decoupled-large-scale-applications-using-javascript-and-jquery

Wrapping classes

jQuery

Options

Research

See related enable and disable widget notes in http://en.wikipedia.org/wiki/GUI_widget .

Frameworks

Plugins

Searched through the plugins directory to find something similar.

Name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.