Good day! There is a script:

$(".show-more").click(function(){ $(document).find(".more-card:not(:visible):lt(1)").slideToggle('fast', function() { if ($(document).find(".more-img:card(:visible)").length==0) { $(".show-more").css("display","none"); } } ); }) 

Gives an error message:

 more-card.js:2 Uncaught TypeError: $(...).find(...).slideToggle is not a function at HTMLAnchorElement.<anonymous> (more-card.js:2) at HTMLAnchorElement.dispatch (jquery-3.2.1.min.js:3) at HTMLAnchorElement.q.handle (jquery-3.2.1.min.js:3) (anonymous) @ more-card.js:2 dispatch @ jquery-3.2.1.min.js:3 q.handle @ jquery-3.2.1.min.js:3 

Should click on the button to show the next line.

Elsewhere, a similar script works without problems.
Please tell me what could be the problem?

 $(".show-more").click(function() { $(document).find(".more-card:not(:visible):lt(1)").slideToggle('fast', function() { if ($(document).find(".more-img:card(:visible)").length == 0) { $(".show-more").css("display", "none"); } } ); }) 
 .more-card { display: none; } 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!-- ********* --> <div class="conteiner patrons-row-card"> <div class="row"> <div class="col-6"> <div class="patrons-card"> <div class="row"> <div class="col-6"> <img src="../img/main_patrons_img_01.jpg" alt=""> </div> <div class="col-6"> <div class="patrons-card-border"> <h4>Русский Иллюзион</h4> <p class="patrons-card-p">Π³. Москва</p> <div class="row"> <p><img src="../img/patrons_icon_rub.png" alt=""> <img src="../img/patrons_icon_star.png" alt=""> <span class="patrons-main-icon-text">> 500 000 Ρ€ΡƒΠ±.</span></p> </div> </div> </div> </div> </div> </div> <div class="col-6"> <div class="patrons-card"> <div class="row"> <div class="col-6"> <img src="../img/main_patrons_img_02.jpg" alt=""> </div> <div class="col-6"> <div class="patrons-card-border"> <h4>Русский страховой Ρ†Π΅Π½Ρ‚Ρ€</h4> <p class="patrons-card-p">Π³. Москва</p> <div class="row"> <p><img src="../img/patrons_icon_rub.png" alt=""> <img src="../img/patrons_icon_cub.png" alt=""> <img src="../img/patrons_icon_star.png" alt=""> <span class="patrons-main-icon-text">> 1 000 000 Ρ€ΡƒΠ±.</span></p> </div> </div> </div> </div> </div> </div> </div> </div> <!-- ********* --> <div class="conteiner patrons-row-card more-card"> <div class="row"> <div class="col-6"> <div class="patrons-card"> <div class="row"> <div class="col-6"> <img src="../img/main_patrons_img_03.jpg" alt=""> </div> <div class="col-6"> <div class="patrons-card-border"> <h4>Бибирская ΠΏΠΈΡ€ΠΎΡ‚Π΅Ρ…Π½ΠΈΠΊΠ°</h4> <p class="patrons-card-p">Π³. Π•ΠΊΠ°Ρ‚Π΅Ρ€Π΅Π½Π±ΡƒΡ€Π³</p> <div class="row"> <p><img src="../img/patrons_icon_rub.png" alt=""> </p> </div> </div> </div> </div> </div> </div> <div class="col-6"> <div class="patrons-card"> <div class="row"> <div class="col-6"> <img src="../img/main_patrons_img_04.jpg" alt=""> </div> <div class="col-6"> <div class="patrons-card-border"> <h4>Русская химичСская компания</h4> <p class="patrons-card-p">Π³. НиТний Новгород</p> <div class="row"> <p><img src="../img/patrons_icon_rub.png" alt=""> <img src="../img/patrons_icon_star.png" alt=""> <span class="patrons-main-icon-text">> 1 000 000 Ρ€ΡƒΠ±.</span></p> </div> </div> </div> </div> </div> </div> </div> </div> <div class="patrons-button"><a class="button-1 show-more" href="#" role="button">ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΡŒ Π΅Ρ‰Π΅</a></div> 

  • what could be the problem? - in anything. Without a minimal reproducible example, one can only guess what code you have and if there is any mistake at all. - Grundy
  • i am sorry code added - Vyacheslav Guryanov
  • @ codename0082016, if you insert a snippet, make it work, at least you need to connect jquery - Grundy
  • how to connect it? - codename0082016
  • By itself, the provided code works as expected (a working snippet demonstrates this). Are there any other errors in the console? - Grundy

0