HTML:私はIEでその上映をにconsole.logを行う際に、ここでいただきました奇数jqueryの内の最初の子
<div class="wrapper" style="display:none">
<div class="panel"></div>
</div>
JSのCALL
var element = $(".wrapper");
element.toggle().children(":first").custom();
$(".wrapper .panel").custom();
CUSTOM jQueryのMETHOD
$.fn.custom = function() {
return this.each(function() {
console.log(" this = ", this);
// do something to each dom element.
});
};
パネル要素への最初の呼び出しは、
[オブジェクトHTMLGenericElement]
が、これがあると、最初の呼び出しは、あなたが使用する必要があります[objectHTMLDIVElement]
それはなぜですか? –
まだ同じ結果が返ってきます – Chapsterj
@SKS、[基本的なプラグインオーサリング](http://docs.jquery.com/Plugins/Authoring)ページ – Starx