Documentation

1 Getting Started
2 Design Overview
3 Page Controller Boot Process
4 Your First App
5 Page Controller
6 Modules
7 Components
8 jqcEmpty
9 jqcLabel
10 jqcButton
11 jqcLayer
12 jqcPanelDeck
13 jqcAccordion
14 jqcProgressBar
15 Data Binding & Remote Data Synchronization
16 jqcDataService
17 jqcDataModel
18 jqcViewModel
19 jqcList
20 jqcTable
21 jqcForm
22 jqcResponsiveLayoutManager
23 jqcTreeList
24 Demos

jqcEmpty


This document matches version 1.6.0 .

The jqcEmpty component doesn't actually do anything. It is just an easy way to associate a JavaScript object with an HTML element. You can add functions to this JavaScript object after the jqcEmpty component is instantiated. You can also just use the jqcEmpty component as an easy way to access the associated HTML element (via the components jqc.element property).

jqcEmpty Example

Here is a jqcEmpty example:

<span id="myEmpty" jqc-type="jqcEmpty"></span>

<span jqc-module="myModule"></span>

<script>
  function myModule() {
    var module = {};

    module.postInstantiate = function() {
      var components = module.jqc.pageController.components;

      components.myEmpty.jqc.element.html("HTML inserted into empty component's element");
    }

    return module;
  }


</script>    

You could also add functions to the empty component, like this:

<span id="myEmpty" jqc-type="jqcEmpty"></span>

<span jqc-module="myModule"></span>

<script>
  function myModule() {
    var module = {};

    module.postInstantiate = function() {
      var components = module.jqc.pageController.components;

    
      components.myEmpty.jqc.element.html("HTML inserted into empty component's element");

      components.myEmpty.myFunction = function() {
        // do something
      }
    }

    return module;
  }

</script>

This function can then be called from other components (typically via callbacks) or from modules.

Target Elements

You can associate a jqcEmpty component with any HTML element.