public static
|
#
affix( string $selector = 'affix', array $params = array() )
Add javascript support for the Bootstrap affix plugin
Add javascript support for the Bootstrap affix plugin
Parameters
- $selector
string - $selector Unique selector for the element to be affixed.
- $params
array - $params An array of options. Options for the affix plugin can be: - offset
number|function|object Pixels to offset from screen when calculating position of
scroll. If a single number is provided, the offset will be applied in both top
and left directions. To listen for a single direction, or multiple unique
offsets, just provide an object offset: { x: 10 }. Use a function when you need
to dynamically provide an offset (useful for some responsive designs).
Since
3.1
|
public static
|
#
alert( string $selector = 'alert' )
Add javascript support for Bootstrap alerts
Add javascript support for Bootstrap alerts
Parameters
- $selector
string - $selector Common class for the alerts
Since
3.0
|
public static
|
#
button( string $selector = 'button' )
Add javascript support for Bootstrap buttons
Add javascript support for Bootstrap buttons
Parameters
- $selector
string - $selector Common class for the buttons
Since
3.1
|
public static
|
#
carousel( string $selector = 'carousel', array $params = array() )
Add javascript support for Bootstrap carousels
Add javascript support for Bootstrap carousels
Parameters
- $selector
string - $selector Common class for the carousels.
- $params
array - $params An array of options for the carousel. Options for the carousel can be: -
interval number The amount of time to delay between automatically cycling an
item. If false, carousel will not automatically cycle. - pause string Pauses the
cycling of the carousel on mouseenter and resumes the cycling of the carousel on
mouseleave.
Since
3.0
|
public static
|
#
dropdown( string $selector = 'dropdown-toggle' )
Add javascript support for Bootstrap dropdowns
Add javascript support for Bootstrap dropdowns
Parameters
- $selector
string - $selector Common class for the dropdowns
Since
3.0
|
public static
|
#
framework( mixed $debug = null )
Method to load the Bootstrap JavaScript framework into the document head
Method to load the Bootstrap JavaScript framework into the document head
If debugging mode is on an uncompressed version of Bootstrap is included for
easier debugging.
Parameters
- $debug
mixed - $debug Is debugging mode on? [optional]
Since
3.0
|
public static
|
#
modal( string $selector = 'modal', array $params = array() )
Add javascript support for Bootstrap modals
Add javascript support for Bootstrap modals
Deprecated
4.0 This method was used by the old renderModal() implementation. Since the new
implementation it is unneeded and the broken JS it was injecting could create
issues As a case, please see: https://github.com/joomla/joomla-cms/pull/6918
Parameters
- $selector
string - $selector The ID selector for the modal.
- $params
array - $params An array of options for the modal. Options for the modal can be: -
backdrop boolean Includes a modal-backdrop element. - keyboard boolean Closes
the modal when escape key is pressed. - show boolean Shows the modal when
initialized. - remote string An optional remote URL to load
Since
3.0
|
public static
string
|
#
renderModal( string $selector = 'modal', array $params = array(), string $body = '' )
Method to render a Bootstrap modal
Method to render a Bootstrap modal
Parameters
- $selector
string - $selector The ID selector for the modal.
- $params
array - $params An array of options for the modal. Options for the modal can be: - title
string The modal title - backdrop mixed A boolean select if a modal-backdrop
element should be included (default = true) The string 'static' includes a
backdrop which doesn't close the modal on click. - keyboard boolean Closes the
modal when escape key is pressed (default = true) - closeButton boolean Display
modal close button (default = true) - animation boolean Fade in from the top of
the page (default = true) - footer string Optional markup for the modal footer -
url string URL of a resource to be inserted as an <iframe>
inside the modal body - height string height of the <iframe>
containing the remote resource - width string width of the
<iframe> containing the remote resource
- $body
string - $body Markup for the modal body. Appended after the <iframe>
if the URL option is set
Returns
string - HTML markup for a modal
Since
3.0
|
public static
|
#
popover( string $selector = '.hasPopover', array $params = array() )
Add javascript support for Bootstrap popovers
Add javascript support for Bootstrap popovers
Use element's Title as popover content
Parameters
- $selector
string - $selector Selector for the popover
- $params
array - $params An array of options for the popover. Options for the popover can be:
animation boolean apply a css fade transition to the popover html boolean Insert
HTML into the popover. If false, jQuery's text method will be used to insert
content into the dom. placement string|function how to position the popover -
top | bottom | left | right selector string If a selector is provided, popover
objects will be delegated to the specified targets. trigger string how popover
is triggered - hover | focus | manual title string|function default title value
if title tag isn't present content string|function default content
value if data-content attribute isn't present delay number|object
delay showing and hiding the popover (ms) - does not apply to manual trigger
type If a number is supplied, delay is applied to both hide/show Object
structure is: delay: { show: 500, hide: 100 } container string|boolean Appends
the popover to a specific element: { container: 'body' }
Since
3.0
|
public static
|
#
scrollspy( string $selector = 'navbar', array $params = array() )
Add javascript support for Bootstrap ScrollSpy
Add javascript support for Bootstrap ScrollSpy
Parameters
- $selector
string - $selector The ID selector for the ScrollSpy element.
- $params
array - $params An array of options for the ScrollSpy. Options for the ScrollSpy can be:
- offset number Pixels to offset from top when calculating position of scroll.
Since
3.0
|
public static
|
#
tooltip( string $selector = '.hasTooltip', array $params = array() )
Add javascript support for Bootstrap tooltips
Add javascript support for Bootstrap tooltips
Add a title attribute to any element in the form title="title::text"
Parameters
- $selector
string - $selector The ID selector for the tooltip.
- $params
array - $params An array of options for the tooltip. Options for the tooltip can be: -
animation boolean Apply a CSS fade transition to the tooltip - html boolean
Insert HTML into the tooltip. If false, jQuery's text method will be used to
insert content into the dom. - placement string|function How to position the
tooltip - top | bottom | left | right - selector string If a selector is
provided, tooltip objects will be delegated to the specified targets. - title
string|function Default title value if title tag isn't present -
trigger string How tooltip is triggered - hover | focus | manual - delay integer
Delay showing and hiding the tooltip (ms) - does not apply to manual trigger
type If a number is supplied, delay is applied to both hide/show Object
structure is: delay: { show: 500, hide: 100 } - container string|boolean Appends
the popover to a specific element: { container: 'body' }
Since
3.0
|
public static
|
#
tooltipExtended( boolean $extended = true )
Loads js and css files needed by Bootstrap Tooltip Extended plugin
Loads js and css files needed by Bootstrap Tooltip Extended plugin
Parameters
- $extended
boolean - $extended If true, bootstrap-tooltip-extended.js and .css files are loaded
Since
3.6
|
public static
|
#
typeahead( string $selector = '.typeahead', array $params = array() )
Add javascript support for Bootstrap typeahead
Add javascript support for Bootstrap typeahead
Parameters
- $selector
string - $selector The selector for the typeahead element.
- $params
array - $params An array of options for the typeahead element. Options for the tooltip
can be: - source array, function The data source to query against. May be an
array of strings or a function. The function is passed two arguments, the query
value in the input field and the process callback. The function may be used
synchronously by returning the data source directly or asynchronously via the
process callback's single argument. - items number The max number of items to
display in the dropdown. - minLength number The minimum character length needed
before triggering autocomplete suggestions - matcher function The method used to
determine if a query matches an item. Accepts a single argument, the item
against which to test the query. Access the current query with this.query.
Return a boolean true if query is a match. - sorter function Method used to sort
autocomplete results. Accepts a single argument items and has the scope of the
typeahead instance. Reference the current query with this.query. - updater
function The method used to return selected item. Accepts a single argument, the
item and has the scope of the typeahead instance. - highlighter function Method
used to highlight autocomplete results. Accepts a single argument item and has
the scope of the typeahead instance. Should return html.
Since
3.0
|
public static
string
|
#
startAccordion( string $selector = 'myAccordian', array $params = array() )
Add javascript support for Bootstrap accordians and insert the accordian
Add javascript support for Bootstrap accordians and insert the accordian
Parameters
- $selector
string - $selector The ID selector for the tooltip.
- $params
array - $params An array of options for the tooltip. Options for the tooltip can be: -
parent selector If selector then all collapsible elements under the specified
parent will be closed when this collapsible item is shown. (similar to
traditional accordion behavior) - toggle boolean Toggles the collapsible element
on invocation - active string Sets the active slide during load - onShow
function This event fires immediately when the show instance method is called. -
onShown function This event is fired when a collapse element has been made
visible to the user (will wait for css transitions to complete). - onHide
function This event is fired immediately when the hide method has been called. -
onHidden function This event is fired when a collapse element has been hidden
from the user (will wait for css transitions to complete).
Returns
string - HTML for the accordian
Since
3.0
|
public static
string
|
#
endAccordion( )
Close the current accordion
Close the current accordion
Returns
string - HTML to close the accordian
Since
3.0
|
public static
string
|
#
addSlide( string $selector, string $text, string $id, string $class = '' )
Begins the display of a new accordion slide.
Begins the display of a new accordion slide.
Parameters
- $selector
string - $selector Identifier of the accordion group.
- $text
string - $text Text to display.
- $id
string - $id Identifier of the slide.
- $class
string - $class Class of the accordion group.
Returns
string - HTML to add the slide
Since
3.0
|
public static
string
|
#
endSlide( )
Close the current slide
Returns
string - HTML to close the slide
Since
3.0
|
public static
string
|
#
startTabSet( string $selector = 'myTab', array $params = array() )
Creates a tab pane
Parameters
- $selector
string - $selector The pane identifier.
- $params
array - $params The parameters for the pane
Returns
string
Since
3.1
|
public static
string
|
#
endTabSet( )
Close the current tab pane
Close the current tab pane
Returns
string - HTML to close the pane
Since
3.1
|
public static
string
|
#
addTab( string $selector, string $id, string $title )
Begins the display of a new tab content panel.
Begins the display of a new tab content panel.
Parameters
- $selector
string - $selector Identifier of the panel.
- $id
string - $id The ID of the div element
- $title
string - $title The title text for the new UL tab
Returns
string - HTML to start a new panel
Since
3.1
|
public static
string
|
#
endTab( )
Close the current tab content panel
Close the current tab content panel
Returns
string - HTML to close the pane
Since
3.1
|
public static
string
|
#
startPane( string $selector = 'myTab', array $params = array() )
Creates a tab pane
Deprecated
4.0 Use JHtml::_('bootstrap.startTabSet') instead.
Parameters
- $selector
string - $selector The pane identifier.
- $params
array - $params The parameters for the pane
Returns
string
Since
3.0
|
public static
string
|
#
endPane( )
Close the current tab pane
Close the current tab pane
Deprecated
4.0 Use JHtml::_('bootstrap.endTabSet') instead.
Returns
string - HTML to close the pane
Since
3.0
|
public static
string
|
#
addPanel( string $selector, string $id )
Begins the display of a new tab content panel.
Begins the display of a new tab content panel.
Deprecated
4.0 Use JHtml::_('bootstrap.addTab') instead.
Parameters
- $selector
string - $selector Identifier of the panel.
- $id
string - $id The ID of the div element
Returns
string - HTML to start a new panel
Since
3.0
|
public static
string
|
#
endPanel( )
Close the current tab content panel
Close the current tab content panel
Deprecated
4.0 Use JHtml::_('bootstrap.endTab') instead.
Returns
string - HTML to close the pane
Since
3.0
|
public static
|
#
loadCss( boolean $includeMainCss = true, string $direction = 'ltr', array $attribs = array() )
Loads CSS files needed by Bootstrap
Loads CSS files needed by Bootstrap
Parameters
- $includeMainCss
boolean - $includeMainCss If true, main bootstrap.css files are loaded
- $direction
string - $direction rtl or ltr direction. If empty, ltr is assumed
- $attribs
array - $attribs Optional array of attributes to be passed to JHtml::_('stylesheet')
Since
3.0
|