// source --> https://sotogofun.club/wp-content/themes/ships_tcd098/js/like.js?ver=1.16 
jQuery(document).ready(function($){

  $(document).on('click','#js-like-counter',function(){

    var target = $(this);
    var postId = target.data('id');

    $.ajax({
      url: TCD_FUNCTIONS.ajax_url,
      type: 'POST',
      data: {
        'action' : 'ajax_update_like_count',
        'postID' : postId
      },
      success: function(data) {

        var jsonObj = JSON.parse(data);
        var newCount = jsonObj['new'];
        var oldCount = jsonObj['old'];
        if( newCount > oldCount ){
          target.addClass('is-liked');
        }else{
          target.removeClass('is-liked');
        }
        $('> .num',target).html(newCount);
      },
      error: function() {
        alert(TCD_FUNCTIONS.ajax_error_message);
      }
    });
    return false;

  });

});
// source --> https://sotogofun.club/wp-content/plugins/simple-tags/assets/frontend/js/frontend.js?ver=3.50.0 
jQuery(document).ready(function($) {
    // -------------------------------------------------------------
    //   Show More / Close Table Functions
    // -------------------------------------------------------------
    function showMore() {
        var rows = $(".taxopress-table-row");
        rows.each(function (index, row) {
            if (index >= 6) {
                $(row).show();
            }
        });
        $(".taxopress-see-more-link").hide();
        $(".taxopress-close-table-link").show();
    }
    
    function closeTable() {
        var rows = $(".taxopress-table-row");
        rows.each(function (index, row) {
            if (index >= 6) {
                $(row).hide();
            }
        });
        $(".taxopress-close-table-link").hide();
        $(".taxopress-see-more-link").show();
    }
    
    // Event listeners for Show More and Close Table
    $(document).on('click', '.taxopress-see-more-link', function (e) {
        e.preventDefault();
        showMore();
    });

    $(document).on('click', '.taxopress-close-table-link', function (e) {
        e.preventDefault();
        closeTable();
    });
});