नोंद: साठवून ठेवल्यानंतर बदल पहाण्यासाठी कदाचित तुमच्या ब्राऊजरच्या कॅचेला बायपास करावे लागेल.

  • फ़ायरफ़ॉक्स / सफ़ारी: धरुन ठेवा Shift टिचकी मारताना Reload, किंवा हे दाबताना Ctrl-F5 किंवा Ctrl-R (⌘-R मॅकवर)
  • गुगल क्रोम: दाबा Ctrl-Shift-R (⌘-Shift-R मॅकसाठी)
  • ओपेरा: कडे जा Menu → Settings (ओपेरा → पसंतीक्रम on a Mac) आणि मग गोपनियता आणि सुरक्षा → ब्राउजिंग डाटा काढून टाका → कॅचे छायाचित्रे आणि धारिणी.
'use strict';
$( function () {
	$.each( document.querySelectorAll( '.switcher-container' ), function ( i ) {
		var activeElement, $radio,
			switchers = [], container = this, radioName = 'switcher-' + i;
		$.each( this.children, function () {
			var switcher = this,
				$labelContainer = $( switcher.querySelector('.switcher-label') ),
				$labelText = $labelContainer.contents();
			if ( !$labelText.length ) {
				return;
			}
			switchers.push( switcher );
			$radio = $( '<input type="radio">' ).attr( 'name', radioName ).click( function () {
				$( activeElement ).hide();
				$( switcher ).show();
				activeElement = switcher;
			} );
			if ( !activeElement ) {
				// Mark the first one as selected
				activeElement = switcher;
				$radio.prop( 'checked', true );
			} else if ( $labelContainer.attr( 'data-switcher-default' ) !== undefined ) {
				// Custom default
				$radio.click();
			} else {
				// Hide non-default
				$( switcher ).hide();
			}
			$( '<label style="display:block"></label>' ).append( $radio, $labelText ).appendTo( container );
			$labelContainer.remove();
		} );
		if ( switchers.length > 1 ) {
			$( '<label style="display:block">Show all</label>' ).prepend(
				$( '<input type="radio">' ).attr( 'name', radioName ).click( function () {
					$( switchers ).show();
					activeElement = switchers;
				} )
			).appendTo( container );
		}
		if ( switchers.length === 1 ) {
			$radio.remove();
		}
	} );
} );