english/libraries/joomla/html/html/tabs.php
/**
	 * Load the JavaScript behavior.
	 *
	 * @param   string  The pane identifier.
	 * @param   array  Array of options.
	 * @return  void
	 * @since   11.1
	 */
Load the JavaScript behavior.
@param   string  The pane identifier.
@param   array  Array of options.
Load the JavaScript behavior . @param string The pane identifier . @param array Array of options .
protected static function _loadBehavior($group, $params = array())
	{
		static $loaded = array();
		if (!array_key_exists($group,$loaded))
		{
			JHtml::_('behavior.framework', true);
			$options = '{';
			$opt['onActive']			= (isset($params['onActive'])) ? $params['onActive'] : null ;
			$opt['onBackground']		= (isset($params['onBackground'])) ? $params['onBackground'] : null ;
			$opt['display']				= (isset($params['startOffset'])) ? (int)$params['startOffset'] : null ;
			$opt['useStorage']			= (isset($params['useCookie']) && $params['useCookie']) ? 'true' : null ;
			$opt['titleSelector']		= "'dt.tabs'";
			$opt['descriptionSelector']	= "'dd.tabs'";
			foreach ($opt as $k => $v)
			{
				if ($v) {
					$options .= $k.': '.$v.',';
				}
			}
			if (substr($options, -1) == ',') {
				$options = substr($options, 0, -1);
			}
			$options .= '}';
			$js = '	window.addEvent(\'domready\', function(){
						$$(\'dl#'.$group.'.tabs\').each(function(tabs){
							new JTabs(tabs, '.$options.');
						});
					});';
			$document = JFactory::getDocument();
			$document->addScriptDeclaration($js);
			JHtml::_('script','system/tabs.js', false, true);
			$loaded[$group] = true;
		}
	}
protected static function _loadBehavior ( $ group , $ params = array ( ) ) { static $ loaded = array ( ) ; if ( ! array_key_exists ( $ group , $ loaded ) ) { JHtml :: _ ( 'behavior.framework' , true ) ; $ options = '{' ; $ opt [ 'onActive' ] = ( isset ( $ params [ 'onActive' ] ) ) ? $ params [ 'onActive' ] : null ; $ opt [ 'onBackground' ] = ( isset ( $ params [ 'onBackground' ] ) ) ? $ params [ 'onBackground' ] : null ; $ opt [ 'display' ] = ( isset ( $ params [ 'startOffset' ] ) ) ? ( int ) $ params [ 'startOffset' ] : null ; $ opt [ 'useStorage' ] = ( isset ( $ params [ 'useCookie' ] ) && $ params [ 'useCookie' ] ) ? 'true' : null ; $ opt [ 'titleSelector' ] = " 'dt.tabs' " ; $ opt [ 'descriptionSelector' ] = " 'dd.tabs' " ; foreach ( $ opt as $ k => $ v ) { if ( $ v ) { $ options .= $ k . ': ' . $ v . ',' ; } } if ( substr ( $ options , - 1 ) == ',' ) { $ options = substr ( $ options , 0 , - 1 ) ; } $ options .= '}' ; $ js = '	window.addEvent(\'domready\', function(){
						$$(\'dl#' . $ group . '.tabs\').each(function(tabs){
							new JTabs(tabs, ' . $ options . ');
						});
					});' ; $ document = JFactory :: getDocument ( ) ; $ document -> addScriptDeclaration ( $ js ) ; JHtml :: _ ( 'script' , 'system/tabs.js' , false , true ) ; $ loaded [ $ group ] = true ; } }
Load the JavaScript behavior.
Load the JavaScript behavior .
// Include MooTools framework