Selasa, 17 Desember 2013

Coda Bubbles dengan jQuery

Coda Bubbles dengan jQuery, sebuah widget dengan script jQuery  yang cukup simpel namun menarik dan mudah diterapkan pada blog maupun website, Widget ini akan memberikan efek bubble PopUp apabila image atau ikon tersebut disorot, PopUp bisa berisi isi keterangan dari sebuah gambar yang dimaksud misalkan saja pada sebuah tombol download file.



{

        beingShown = true;



        // reset position of popup box

        popup.css({

          top: -100,

          left: -33,

          display: 'block' // brings the popup back in to view

        })



        // (we're using chaining on the popup) now animate it's opacity and position

        .animate({

          top: '-=' + distance + 'px',

          opacity: 1

        }, time, 'swing', function() {

          // once the animation is complete, set the tracker variables

          beingShown = false;

          shown = true;

        });

      }

    }).mouseout(function () {

      // reset the timer if we get fired again - avoids double animations

      if (hideDelayTimer) clearTimeout(hideDelayTimer);

     

      // store the timer so that it can be cleared in the mouseover if required

      hideDelayTimer = setTimeout(function () {

        hideDelayTimer = null;

        popup.animate({

          top: '-=' + distance + 'px',

          opacity: 0

        }, time, 'swing', function () {

          // once the animate is complete, set the tracker variables

          shown = false;

          // hide the popup entirely after the effect (opacity alone doesn't do the job)

          popup.css('display', 'none');

        });

      }, hideDelay);

    });

  });

});

   

</script>7. Simpan dulu pekerjaannya

8. Langkah selanjutnya bagaimana menggunakannya atau menampilkan Efek yang telah dibuat tadi langkahnya cukup mudah, yaitu cukup menggunakan kode dibawah ini pada postingan kamu atau juga bisa diletakkan pada kodesidebar:

<div class="bubbleInfo">

<a href="http://zonablogger.com/zonadownload" trigger=""><img class="trigger" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAGy9Hh7KqOheDnLvSO6_t1rc5tfPwntDdc268YMIv2Y3fDjKNnBHZdw4JdNJILQxpVaMoKWdXK8Q3lbNSlvdqZ9f8EfKOIXrWHt0TQLW84BOKnwpL6NKaGNc4TA1kVn6OjhICckUuCRuC/s1600/download.png" /></a>

<div class="popup">

<table><tbody>

<tr> <td>Nama </td> <td>: Maximize V1</td> </tr>

<tr> <td>Ukuran</td> <td>: 175kb </td> </tr>

<tr> <td>Platform </td> <td>: Blogspot </td> </tr>

<tr> <td>Price </td> <td>: Free by: blogspot.com</td> </tr>

</tbody></table>

</div>

</div>
Keterangan : 

- Warna hijau : URL atau link target yang akan dituju (harus diubah dengan link download kamu)

- Warna biru : URL tombol (boleh diganti boleh tidak)

- Warna merah : Keterangan dari file / link yang dimaksud silahkan dirubah sesuai dengan punya anda.

- Setiap akan menampilkan Coda Bubble ini cukup meletakkan kode langkah 8) pada postingan.

Related Posts by Categories

0 komentar:

Posting Komentar

FOOTER