weLcome To Dai-detected

Cara Membuat Balon Tooltip Otomatis Ke semua Title Di Blog

Bagikan ke Teman! :


Cara Membuat Balon Tooltip Otomatis Ke semua Title Di Blog

  1. loggin blogger
  2. rancangan,edit html,
  3. cari kode </head> lalu copy kode berikut dan letakkan diatasnya


<style>
#tooltip{width:150px;text-transform:capitalize;z-index: 10000000;position:absolute;background:#000000;-moz-border-radius:5px;-webkit-border-radius: 5px;-khtml-border-radius: 5px;border-radius: 5px;-o-transition:0.5s ease-out; -moz-transition:0.5s ease-out; -webkit-transition:0.5s ease-out;padding:2px 5px;font-size:12px;color:#FF3333;border:1px dashed #FF3333;display:none;font-weight:bold}
</style>
<script type="text/javascript">
this.tooltip = function(){
xOffset = 10;
yOffset = 20;
$(&quot;a[title]&quot;).hover(function(e){
this.t = this.title;
this.title = &quot;&quot;;
$(&quot;body&quot;).append(&quot;<p id='tooltip'>

&quot;+ this.t +&quot;</p>
&quot;);
$(&quot;#tooltip&quot;)
.css(&quot;top&quot;,(e.pageY - xOffset) + &quot;px&quot;)
.css(&quot;left&quot;,(e.pageX + yOffset) + &quot;px&quot;)
.fadeIn(&quot;fast&quot;);
},
function(){
this.title = this.t;
$(&quot;#tooltip&quot;).remove();
});
$(&quot;a[title]&quot;).mousemove(function(e){
$(&quot;#tooltip&quot;)
.css(&quot;top&quot;,(e.pageY - xOffset) + &quot;px&quot;)
.css(&quot;left&quot;,(e.pageX + yOffset) + &quot;px&quot;);
});
};
// starting the script on page load
$(document).ready(function(){
tooltip();
});
</script>

Ganti yang warna merah sesuai keinginan !!!

0 komentar — Skip ke Kotak Komentar

:a: :b: :c: :d: :e: :f: :g: :h: :i: :j: : :l: :m: :n: : : :q: :r: :s: :t: :u: :v: :w: : :y: Emotion lainnya?

Posting Komentar — or Kembali ke Postingan