adm777,
$(function() {
var resetAll = $(".cf_resetAll_link").toggleClass("cf_resetAll_link-vis", $(".cf_sel_opt").length);
$(".cf_option").on("click", function() {
resetAll.toggleClass("cf_resetAll_link-vis", $(".cf_sel_opt").length)
});
});
|
adm777,
Вам надо найти обработчик этого фильтра в коде, тут телепатов очень мало. |
adm777,
<style type="text/css">
.cf_resetAll_link {
display: none;
}
.cf_resetAll_link-vis {
display: inline;
}
</style>
<script>
jQuery(function() {
var resetAll = jQuery(".cf_resetAll_link").toggleClass("cf_resetAll_link-vis", jQuery(".cf_option:nth-child(n+2).cf_sel_opt").length);
jQuery(".cf_option").on("click", function() {
resetAll.toggleClass("cf_resetAll_link-vis", jQuery(".cf_option:nth-child(n+2).cf_sel_opt").length)
});
});
</script>
|
|
adm777,
может где-то старые версии скрипта запускаются сделайте так перед body
<script>
var resetAll = jQuery(".cf_resetAll_link").toggleClass("cf_resetAll_link-vis", jQuery(".cf_option:nth-child(n+2).cf_sel_opt").length);
</script>
</body>
|
<script>
if(document.querySelectorAll(".cf_sel_opt").length==0) document.querySelector(".cf_resetAll_link").style.display='none';
</script>
или так |
Спасибо, но все по прежнему, попробовал оба варианта.
|
setTimeout(function(){
if(document.querySelectorAll(".cf_sel_opt").length==0) document.querySelector(".cf_resetAll_link").style.display='none';
},1000)
так попробуйте |
Цитата:
1 страница формируется неизвестно как и сколько, с 1000 можно не угадать 2. document.querySelectorAll(".cf_sel_opt").length всегда есть!!! 3. Цитата:
|
по второму пункту
Цитата:
подробней если можно. |
| Часовой пояс GMT +3, время: 14:33. |