Hello, you have come here looking for the meaning of the word
User:Erutuon/scripts/vsSwitcher.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word
User:Erutuon/scripts/vsSwitcher.js, but we will also tell you about its etymology, its characteristics and you will know how to say
User:Erutuon/scripts/vsSwitcher.js in singular and plural. Everything you need to know about the word
User:Erutuon/scripts/vsSwitcher.js you have here. The definition of the word
User:Erutuon/scripts/vsSwitcher.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition of
User:Erutuon/scripts/vsSwitcher.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
function viewSwitching($rootElement) {
var showButtonText = $rootElement.data("vs-showtext") || "more ▼";
var hideButtonText = $rootElement.data("vs-hidetext") || "less ▲";
var toSkip = $rootElement.find(".newVsSwitcher").find("*");
var allElemsToHide = $rootElement.find(".newVsHide").not(toSkip);
var allElemsToShow = $rootElement.find(".newVsShow").not(toSkip);
// Determine the visibility toggle category (for the links in the bar on the left).
var toggleCategory = $rootElement.data("toggle-category");
if (!toggleCategory) {
var classNames = $rootElement.attr("class").split(/\s+/);
for (var i = 0; i < classNames.length; ++i) {
var className = classNames.split("-");
if (className == "newVsToggleCategory") {
toggleCategory = className;
}
}
}
if (!toggleCategory)
toggleCategory = "others";
// Find the element to place the toggle button in.
$rootElement.find(".newVsToggleElement").not(toSkip).each(function (i, elem) {
$this = $(this);
// The toggleElement becomes clickable in its entirety, but
// we need to prevent this if a contained link is clicked instead.
$this.children("a").on("click", function (e) {
e.stopPropagation();
});
// Add the toggle button.
var toggleButton = $("<a>");
$("<span>").addClass("NavToggle").append(toggleButton).prependTo($this);
var elemsToShow = allElemsToShow;
var elemsToHide = allElemsToHide;
var subtoggle = $this.data("vs-subtoggle");
if (subtoggle) {
elemsToShow = elemsToShow.filter(function (i, elem) { return $(elem).data("vs-subtoggle") == subtoggle; });
elemsToHide = elemsToHide.filter(function (i, elem) { return $(elem).data("vs-subtoggle") == subtoggle; });
}
// Register the visibility toggle.
$this.css("cursor", "pointer");
$this.on("click", window.VisibilityToggles.register(toggleCategory,
function show() {
toggleButton.html(hideButtonText);
elemsToShow.hide();
elemsToHide.show();
},
function hide() {
toggleButton.html(showButtonText);
elemsToShow.show();
elemsToHide.hide();
}));
});
}
$(function () {
$(".newVsSwitcher").each(function (i, elem) {
viewSwitching($(elem));
});
});