Skip to content

Commit

Permalink
only draw default list container if target empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Bearded Avenger committed Jun 18, 2015
1 parent 651bc19 commit 0f1e589
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions public/assets/js/wp-live-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
// make the search request
$.getJSON( url, function( response ) {

console.log(response)

// remove current list of posts
$(postList).children().remove()

Expand Down
2 changes: 2 additions & 0 deletions public/includes/class.shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public function shortcode( $atts, $content = null ) {
<div id="wpls--loading" class="wpls--loading"><div class="wpls--loader"></div></div>
</div>

<?php if ( !$atts['target'] ) { ?>
<ul itemprop="target" id="wpls--post-list"></ul>
<?php } ?>

</div>

Expand Down

0 comments on commit 0f1e589

Please sign in to comment.