JavaScript

最新版のLazy Loadについて

いつの間にかjQueryのLazy Loadプラグインがバージョンアップされていました。以前「スクロールするまで画像を読み込まない(はずの)Lazy Loadについて」の記事があり、Lazy Loadの使用を断念しましたが修正されたようです。(記事作成時のバージョンは 1.6…

jQueryを使用したアコーディオン

jQueryを使用したアコーディオンを作ります。まずは jQueryをダウンロード します。次にHTMLです。accordion.html <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> …</html>

Ajaxを利用してPostGISの情報をGoogle Mapsに表示する。

まずはHTML <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> </meta></meta></head></html>

IEで親ウィンドウに要素を追加する。

IEで親ウィンドウに要素を作成して追加する際に子ウィンドウのdocumentを使用するとうまくいかない。 親ウィンドウ <table id="table"> <thead> <tr><th>label</th></tr> </thead> <tbody> </tbody> </table> 子ウィンドウJavaScript function test() { var opener = window.opener; var tbody = opener.getElementById("table").getElem…

GoogleMapsの右上、左下の緯度経度を取得する。

var map; ・ ・ ・ function sample() { var bounds = map.getBounds(); var ne = bounds.getNorthEast(); var sw = bounds.getSouthWest(); window.alert("右上緯度:" + ne.lat()); window.alert("右上経度:" + ne.lng()); window.alert("左下緯度:" + s…