resources/src/jquery/jquery.makeCollapsible.js
Function makeCollapsible
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.makeCollapsible = function ( options ) {
options = options || {};
this.each( function () {
// Ensure class "mw-collapsible" is present in case .makeCollapsible()
Function togglingHandler
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function togglingHandler( $toggle, $collapsible, e, options ) {
options = options || {};
if ( e ) {
if (
Function toggleElement
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function toggleElement( $collapsible, expand, $defaultToggle, options ) {
options = options || {};
// Validate parameters
Avoid deeply nested control flow statements. Open
Open
if ( firstval === undefined || !firstval || firstval === '-1' || firstval === -1 ) {
$firstItem.prop( 'value', '1' );
}