Hatena::Groupjavascript

willnetの日記

 | 

2009-12-21

jQueryのプロトタイプに関数を定義する方法

17:02

jQueryのプロトタイプに関数を定義したい場合は

jQuery.fn.hoge = function () {
  // something...
};

とするか

jQuery.fn.extend({
  hoge:function () {
  // something...
  }});

とする。たぶんextend使うと既存の関数を上書きしないようにするんじゃないかな(未確認)。

PriscillaPriscilla2013/08/01 22:48A million thanks for posting this inotimafron.

KertKert2016/04/29 13:11That's really thinikng out of the box. Thanks!

RenoReno2016/05/02 12:39Yagislar onceleri yagmur,aksam saatlerinden itibaren Trakya’da karlakarisik yagmur ve kar, gec saatlerden itibaren Marmara,ic Ege,goller yoresi ve ic anadolunun kuzeybatisinda karla karisik yagmur ve kar seklinde olacak. Yagislarin Kiyi Ege,Bati Akdeniz ve Marmara’da etkili ve surekli olmasi bekleniyor.Hava sicakliginin yurdun kuzeybati kesimlerinde hissedilir derecede 8-10 derece azla,asimruzgarin aksam saatlerinden itibaren yurdun kuzeybati kesimlerinde kuzeyli yonlerden kuvvetli yer yer kisa sureli firtina seklinde esmesi bekleniyor. http://fuamarty.com [url=http://uypzgymx.com]uypzgymx[/url] [link=http://lpxiwaj.com]lpxiwaj[/link]

SteffieSteffie2016/05/02 19:58or is feeling <a href="http://ryevois.com">rudsrown.A-sonted</a> homeopathic remedies for colds, flus, fevers, and bug bites, teething.  While traditional homeopaths claim the combo remedies available are not the way to go, for home

NericeNerice2016/05/03 20:07You take the most gorgeous phhTagropos!this part of your writing really struck a cord with me;“The thought of ” lets get over with it” comes to my mind. I have the feeling that what everybody is trying to get over with is life. The fast forward button.”I was in a drunken club circuit up until before christmas and I am finding your ideas very inspiring.[] http://dclrxll.com [url=http://hosewf.com]hosewf[/url] [link=http://cquhydu.com]cquhydu[/link]

 |