Hızlı Konu Açma

Hızlı Konu Açmak için tıklayınız.

Son Mesajlar

Konulardaki Son Mesajlar

Reklam

Forumda Reklam Vermek İçin Bize Ulaşın

İkonları Sürükle Bırak(Ziyaretçiler için)

BlackKey

Üye
Fenerbahçe
Kayıtlı Üye
Katılım
12 Eylül 2014
Mesajlar
167
Tepkime puanı
0
Puanları
0
Sitenize ayrı bir güzellik katacak bu JS kodu ile, site içerisinde ziyaretçilerinizin küçük smiley resmini herhangi bir yere taşımalarını sağlayabiliyorsunuz. Kısaca sürükle-bırak için hazırlanmış güzel bir örnek uygulama.

Kod:
[/B][/FONT][/COLOR][COLOR=#B5B5B5][FONT=tahoma]<style>[/FONT][/COLOR]
<!--
.dragme{position:relative;}
-->
</style>
<script language="JavaScript1.2">
<!--

var ie=********.all;
var nn6=********.getElementById&&!********.all;

var isdrag=false;
var x,y;
var dobj;

function movemouse(e)
{
  if (isdrag)
  {
    dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x;
    dobj.style.top  = nn6 ? ty + e.clientY - y : ty + event.clientY - y;
    return false;
  }
}

function selectmouse(e) 
{
  var fobj       = nn6 ? e.target : event.srcElement;
  var topelement = nn6 ? "HTML" : "BODY";

  while (fobj.tagName != topelement && fobj.className != "dragme")
  {
    fobj = nn6 ? fobj.parentNode : fobj.parentElement;
  }

  if (fobj.className=="dragme")
  {
    isdrag = true;
    dobj = fobj;
    tx = parseInt(dobj.style.left+0);
    ty = parseInt(dobj.style.top+0);
    x = nn6 ? e.clientX : event.clientX;
    y = nn6 ? e.clientY : event.clientY;
    ********.onmousemove=movemouse;
    return false;
  }
}

********.onmousedown=selectmouse;
********.onmouseup=new Function("isdrag=false");

//-->
</script>
 [COLOR=#B5B5B5][FONT=tahoma]<img src="http://elouai.com/images/AIM_smiley.gif" class="dragme">[/FONT][/COLOR][COLOR=#B5B5B5][FONT=Century Gothic][B]
 

Users Who Are Viewing This Konu (Users: 0, Guests: 1)

Üst