我有這段代碼塊:jQuery的追加按鈕內部事業部
<div class="services">
<div class="grid grid-pad">
<?php
query_posts(array('post_type' => 'services', 'posts_per_page' => -1));
while (have_posts()) : the_post();
?>
<div class="col-1-3 tri-clear">
<div class="single-service">
<i class="fa <?php echo types_render_field("icon", array("output" => "raw")); ?> service-icon"></i>
<?php the_title('<h3 class="service-title">', '</h3>'); ?>
<?php the_content('<p>', '</p>'); ?>
</div>
</div>
<?php endwhile; ?>
<!-- how to add button here? -->
</div>
</div>
我想補充<button>Contact Us</button>
那裏(我的地方標記)。由於我無法編輯源代碼的原因,但我可以添加自定義JavaScript(使用jQuery)添加按鈕。如何實現它?
感謝您的諮詢。
檢查此[演示](https://jsfiddle.net/guradio/0xskvkoy/) – guradio