jQuery
wafuwafu13.hatenadiary.comいよいよ今回は、以下のHTMLを用意して実際にDOMを取得していく。 <html> <head> <script src="https://code.jquery.com/jquery-3.5.1.js"></script> </head> <body> <h1 id="hello">hello world</h1> <script> console.log($('#hello')) </script> </body> </html> まずは前回と同じように、3133行目に定義されている関数の引数に何が入ってい…
wafuwafu13.hatenadiary.com前回は、以下のHTMLを用意し、 <html> <head> <script src="https://code.jquery.com/jquery-3.5.1.js"></script> </head> <body> <script> console.log($); </script> </body> </html> 以下の実行結果を得た。 ƒ ( selector, context ) { // The jQuery object is actually just the init constructor …
最近、バイトの隙間時間に、jQueryを廃止してTypeScriptにリプレイスする、というタスクをするようになった。 jQueryのDOMの取得を、Documentを使って書き換える時に、jQueryはいかにしてDOMを取得するか、ということが気になったので少し調べていく。今回は…