User:Fumple/common.js

$(".i-menu-filter").click(function{	if($(this).next.css("display") == "none"){		$(this).next.css("display", "block")		$(this).css("background", "#aaaaaa")	}	else{		$(this).next.css("display", "none")		$(this).css("background", "")	} }) $(".i-checkbox").click(function{	if($(this).children.css("opacity") == "0"){		$(this).children.css("opacity", "1")		if($(this).hasClass("i-category")){			var classes = $(this)[0].classList;			for(var i = 0, len = classes.length;i<len;i++){				var curr = classes[i];				if(curr.startsWith("i-category-")){					$("."+curr+":not(.i-checkbox)").css("display", "")					$("."+curr+":not(.i-checkbox)").find("audio, video").each(function{$(this)[0].pause});				}			}		}	}	else{		$(this).children.css("opacity", "0")		if($(this).hasClass("i-category")){			var classes = $(this)[0].classList;			for(var i = 0, len = classes.length;i<len;i++){				var curr = classes[i];				if(curr.startsWith("i-category-")){					$("."+curr+":not(.i-checkbox)").css("display", "none")					$("."+curr+":not(.i-checkbox)").find("audio, video").each(function{$(this)[0].pause});				}			}		}	} })