2016-11-20 63 views
0

我有块图像,这是不同的职位WP的缩略图。阻止“内容();”隐藏在CSS中。点击corespond img后,我需要显示内容。wordpress显示内容块与ajax

在最后一次尝试我试图显示与内容块,我已经收到不匹配与contetn股利和这个错误隐藏的div:

遗漏的类型错误:$不是一个函数(...)

$(".show-more").click(function(){ 
 
           $(document).find(".more_service:not(:visible)").slideToggle('fast', 
 
            function() { 
 
             if ($(document).find(".more_service:not(:visible)").length==0) { 
 
              $(".show-more").css("display","none"); 
 
             } 
 
            } 
 
           ); 
 
          })
#more_service { 
 
    display: none; 
 
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> 
 
<?php 
 
    while ($gadget->have_posts()) : $gadget->the_post(); ?> 
 
<div class="img-hover"> 
 
    <img class="img-responsive img-rounded show-more" id="client" 
 
     src="<?php echo get_the_post_thumbnail_url(); ?>" 
 
     alt="<?php the_title(); ?>"> 
 
</div> 
 

 
<div id="more_service"> 
 
    <?php the_content(); ?> 
 
</div> 
 

 
<?php endwhile; 
 
wp_reset_query(); ?>

请告诉我,我怎么能正确做这个任务?

回答