$(function() {
    $('.lazy').Lazy({
        effect: 'fadeIn',
        visibleOnly: true,
    });

    $('#all-jackpot').paginate({
        scope: $('div'),
        perPage: 39,
        useHashLocation: false,
      });

});

$("#search").on("keyup", function() {
    var panduanValue = document.getElementById("search");
    
    $.ajax({
        type : 'post',
        url : 'assets/search-jp.php',
        data: $('#search').serialize(),
        success : function(dones) {
            $("#search-bukti").html(dones);

            if(panduanValue.value != "") {
                $('#all-jackpot').hide();
                $('#title-home').hide();
                $('#search-bukti').show();
                $('.paginate-pagination').hide();
                
              } else {
                $('#all-jackpot').show();
                $('#title-home').show()
                $('#search-bukti').hide();
                $('.paginate-pagination').show();
              }

        }
    })

});