jsdoc

$.ui.simplicityFancySelect

Namespace $.ui.simplicityFancySelect

Progressively enhanced select. A progressive enhancement of a select input that maps the select to ul and each option to a li. The template can be overriden to generate a different mapping.
Defined in: ui.simplicityFancySelect.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
$.ui.simplicityFancySelect.options
Widget options.
Method Summary
Method Attributes Method Name and Description
<private> <static>  
$.ui.simplicityFancySelect._createOption()
Creates an option from the template.
<private> <static>  
$.ui.simplicityFancySelect._markOptionSelected()
Marks the given DOM node as either selected or unselected.
<static>  
$.ui.simplicityFancySelect.refresh()
Recreates this widget based on the current option elements of the target select input.
<static>  
$.ui.simplicityFancySelect.select()
Returns the target select input.
<static>  
$.ui.simplicityFancySelect.size()
Returns the number of options currently displayed.
Namespace Detail
$.ui.simplicityFancySelect
  <select id="mySelect" name="example">
    <option value="1">one</option>
    <option value="2">two</option>
    <option value="3">three</option>
  <select>
  <div id="myFancy"></div>
  <script type="text/javascript">
    $('#myFancy')
      .simplicityFancySelect({
        select: '#mySelect',
      })
     .hide();
  </script>
Field Detail
<static> $.ui.simplicityFancySelect.options
Widget options.
select
Mandatory option that points to the select input to be enhanced. Can be a DOM node, jQuery node or selector.
displaySelected
Determines whether selected options should be created and displayed. Defaults to true.
displayUnselected
Determines whether unselected options should be created and displayed. Defaults to true.
displayCount
When negative, displays and creates options with no limit. Acts as a limit to the number of created and display options otherwise. Can be thought of as the current page size. Defaults to -1.
skipSelected
When skipCount is greater than zero determines whether a selected option counts when tallying up the number of skipped options. Defaults to true.
skipUnselected
When skipCount is greater than zero determines whether an unselected option counts when tallying up the number of skipped options. Defaults to true.
skipCount
The number of options that should be skipped before the displaySelected and displayUnselected section is reached. Can be thought of as the starting positing of the current page. Defaults to 0.
firstPathOnly
When true a single path is followed through the options. This is backed by the is-path data attribute on the option elements. Defaults to false.
ignorePath
When true any path options (with the is-path data attribute set to true) will be ignored. Defaults to false.
firstPathSelections
When true causes the click handler when deselecting an option which is considered a path (from the is-path data attribute) to alter the current selection to be all the options from the root to it's parent.

In other words, if the current selection is Real Estate -> For Sale -> Condo and For Sale is deselected then the new selection would be Real Estate.

Defaults to false.

refreshOnChange
When true this widget repopulates itself whenever the target select input triggers a change event. Defaults to true.
refreshOnCreate
When true this widget populates itself at creation. Exposed to allow for widgets that compose instances of this one. Defaults to true.
hideWhenEmpty
When true the target element is hidden if the number of created and displayed options drops to zero and shown when it is larger. Defaults to false.
checkableInputSelector
Determines the selector (within the option template) to use to identify a checkable DOM input that reflects the current widget state. Defaults to :checkbox.ui-simplicity-fancy-select-checkbox,:radio.ui-simplicity-fancy-select-radio.
radioStyle
Determines that the single select must always have a value selected, as would be the case for a radio button group. Defaults to false.
template
When '' falls back on the original DOM contents of the attached element. Replaces the contents otherwise. See source code for default value.
Method Detail
<private> <static> $.ui.simplicityFancySelect._createOption()
Creates an option from the template. Adds facet-id, is-path and count data attributes to the created element. Sets the label (.ui-simplicity-fancy-select-label) and count (.ui-simplicity-fancy-select-count) to contained elements that match the appropriate class. Triggers a createOption widget event (externally seen as simplicityfancyfacetscreateoption) which can be used to customize the generated DOM element.

<private> <static> $.ui.simplicityFancySelect._markOptionSelected()
Marks the given DOM node as either selected or unselected. Currently toggles a selected class and looks for any contained inputs (identified by selector checkableInputSelector) and (un)checks them as appropriate.

<static> $.ui.simplicityFancySelect.refresh()
Recreates this widget based on the current option elements of the target select input.

<static> $.ui.simplicityFancySelect.select()
Returns the target select input.

<static> $.ui.simplicityFancySelect.size()
Returns the number of options currently displayed.

Documentation generated by JsDoc Toolkit 2.4.0