Created
October 27, 2015 10:00
-
-
Save xto3na/d6fc997d53f264874909 to your computer and use it in GitHub Desktop.
Toggle Open Block JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var man = 0; | |
$(".manufacturers-filter-block .checkbox").each(function (index, elem) { | |
man++; | |
}); | |
if (man <= 8) { | |
$(".pokaz").remove(); | |
}; | |
$(".pokaz>p").on("click", function (mo) { | |
console.log("click"); | |
$(".manufacturers-filter-block").toggleClass("open"); | |
if ($(".manufacturers-filter-block").hasClass("open")) { | |
$(".pokaz>p").html('Скрыть все<a href="#" onclick="return false"><img src="../image/arrow-top.png"></a>'); | |
}else{ | |
$(".pokaz>p").html('Показать все<a href="#" onclick="return false"><img src="../image/arrows2.png"></a>'); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment