Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

API Description

gustavohenke edited this page Mar 21, 2013 · 10 revisions

Options

  • size (String, default: normal)
  • showOn (String, default: both)
  • clearSearchOnExit (Boolean, default: true)
  • minSearchInput (Number, default: 0)
  • animationDuration (Number, default: 300)

Methods

option( [option], [value] )

  • Get all options of the bselect instance, when option and value are not passed
  • Get a option value, when only option is passed
  • Set the option option to value

element()

  • Return the bselect container element

toggle()

  • Toggles the item list

show()

  • Shows the item list

hide( [clear] )

  • Hide the item list.
  • If clear and the clearSearchOnExit option are true, then the search status will be reset. clear will default to true, if not passed.

clearSearch()

  • Clear the search input
  • Show all items hidden by the search criteria

select( index )

  • Select the option in the provided index.

search( value )

  • Search for the provided value in all the options

refresh()

  • Recreate the option list, reflecting any changes made in the original select element

destroy()

  • Remove the .bselect element from the DOM
  • Show the original select element again
  • Clear bselect related .data() from the original select

Events

  • select: Fires before the selection of a item occurs.
  • selected: Fires after the selection of a item occurred.
  • search
Clone this wiki locally