d-o-bのブックマーク (21)

  • [暴満館] JavaScriptによるCSSの操作

    またFirefoxは短縮形で取得しようとすると、設定していないプロパティにデフォルト値が入った状態で返ってくるので注意する。 getStyleValue( "div.hoge", "background" ) //Mozilla : rgb(17, 34, 51) none repeat scroll 0% 0% ルールを削除する function deleteRule( index, sheetindex ) { if( sheetindex == undefined ) sheetindex = 0; document.styleSheets[ sheetindex ].deleteRule( index ); } 全てのルールにはインデックスが振られており、それを指定することでルールから消すことができる。 ただ、同じセレクタで上書きするのとほとんど変わらないので、あまり必要にならない

    d-o-b
    d-o-b 2007/01/13
    Javascript で CSS をいじくる方法
  • Webアプリに使えるAjaxライブラリ8選! ― @IT

    Ajaxライブラリを機能で分類する 続いてAjaxライブラリの機能比較を行いますが、その前にAjaxライブラリが提供する機能を大きく3つの機能分類に分けたいと思います。 JavaScript関数拡張……開発効率を向上させるための、JavaScript関数を拡張した機能 画面効果……画面上のオブジェクトに対して動的・視覚的な効果を与える機能 GUI部品……リッチなGUI部品を提供する機能

    Webアプリに使えるAjaxライブラリ8選! ― @IT
    d-o-b
    d-o-b 2006/12/31
    Ajax ライブラリの比較
  • CSSベースのクールなフォーム、サンプル集:phpspot開発日誌

    Smashing Magazine | Blog Archive CSS-Based Forms: Modern Solutions In Web 2.0 registration and feedback forms can be found everywhere. Every start-up tries to attract visitors’ attention, CSSベースのクールなフォーム、サンプル集。 デザインにしにくい部分だからこそ、凝っておくと玄人受けはよい筈。色々なデザインがあって感心するばかりです。 Prettier Accessible Forms Badboy Niceforms Functional Pretty Forms Form Layout Templates Fun with forms - customized input elements Scr

    d-o-b
    d-o-b 2006/11/15
    フォームのデザインのサンプル
  • ScriptaculousのEffect実行順序を管理するJSを作ってみた。 - IT戦記

    仕事で使おうと思って作ったら意外といい出来だったので公開してみる。 だうそろーど たとえば、こう書くと var element = $('block'); var planner = new EffectPlanner( [ { Move: [element, {x: 200, y: 200}] }, { Move: [element, {x: 0, y: 300}] }, { Move: [element, {x: 300, y: 0}] }, { Move: [element, {x: 0, y: -300}] }, { Move: [element, {x: -300, y: 0}], next: 1 } ] ); planner.start(); こうなる http://sample.ecmascript.jp/20060523-00.html たとえば、こう書くと var col

    ScriptaculousのEffect実行順序を管理するJSを作ってみた。 - IT戦記
    d-o-b
    d-o-b 2006/11/15
    Scriptaculous の Effect 実行順序を管理する JS
  • 「facebook」の検索結果 - IT戦記

    みなさんお元気ですか?僕は少しだけ元気ではありません。じんわりとした夏の暑さを感じながらブログを書いています。 実は、数ヶ月前にスマートニュースという会社を退職しました。 しばらく無職 しばらくは就職せずに無職でいようかなと思っています。 すぐに再就職した方がいいんだろうな〜。とは思うのですが少し疲れたかも。 いい時代になったものだ 最近は AI の進化も素晴らしく、昔ソフトウェアで出来なかったことがどんどんできるようになってるなって感じます。 Rust とか、ちょうど欲しかった感じのプログラミング言語もあるし、 ChatGPT は完璧ではないけど何か新しいことを始めるときに素晴らしい洞察を与えてくれる。 時代は確実に良くなってる。そんな時代に「自分は働いていないくていいのか」と少し不安になるけれど、自由気ままにコードを書く、そんな時間が今あってのもいいのかなって思ってます。 オフトピック

    「facebook」の検索結果 - IT戦記
    d-o-b
    d-o-b 2006/11/15
    Script.aculo.us の Effect をちょっと簡単に書く方法
  • CSS Drop Shadows II: Fuzzy Shadows

    We thought wrong. The internet being the kind of medium it is, minutes after the publication of the article, we started receiving comments, queries and suggestions for improvements. Most notable among the latter was Phil Baines’ method for keeping the markup simple when dealing with paragraph drop shadows. We are indebted to him. The most complained-about shortcoming of the technique turned out to

    CSS Drop Shadows II: Fuzzy Shadows
    d-o-b
    d-o-b 2006/11/08
    PNG のアルファチャンネルを利用したドロップシャドウ
  • 404 Blog Not Found:javascript - DOMMakerで楽々DHTML

    2006年09月28日02:00 カテゴリLightweight Languages javascript - DOMMakerで楽々DHTML DHTMLは便利なものだが、DOM関連の関数でHTMLを「描く」のは、あまりに面倒だ。 たかだか <a target="blank" href="http://blog.livedoor.jp/dankogai">404 Blog Not Found</a> とやるのに、 var a = document.createElement('a'); a.setAttribute('target', 'blank'); a.setAttribute('href', 'http://blog.livedoor.jp/dankogai'); a.appendChild(document.createTextNode('404 Blog Not Found'

    404 Blog Not Found:javascript - DOMMakerで楽々DHTML
    d-o-b
    d-o-b 2006/10/04
    DOM 操作による HTML エレメントの追加を簡易化する。
  • GLT - Good-Looking Tolltips

    GLT is short for Good-Looking Tooltips and it is a small JavaScript library that you can include to spice up the look of your tooltips in your web page. Move your mouse pointer over any of the headings in the main column here to see it in effect. Read the implementation instructions to use it in any web page. Copyright GLT is free to use in any personal or business web site that is free for visito

    d-o-b
    d-o-b 2006/10/04
    フェード効果と角丸を使った、見栄えのよいツールチップ
  • A forensic analysis of the IE6 BackgroundImageCache command identifier

    The document.execCommand("BackgroundImageCache", false, true) command seems to do at least what it's name suggests: cache the background images. Let's see the visible effects of this command. Step 1: "Is it modified YET?" IE would "normally" check with your web server for newer versions of the css background images prior to applyng a css rule, no matter what is the value of the cache option. Make

    d-o-b
    d-o-b 2006/10/04
    Javascript][CSS][IE6] CSS で指定された背景画像のキャッシュをコントロールし、背景画像切り替え時のパフォーマンスを改善する。
  • Transcorners ― Cornerus Pride is there *scared*

    d-o-b
    d-o-b 2006/10/04
    ボックスエレメントの角を丸くするライブラリ
  • Stu Nicholls | CSS PLAY | Percentage PLUS Pixels Sizes

    BOXES › Percentage Plus Pixel Sizing Date : Pre 2006 For all browsers This is the OUTSIDE box Thinking outside the box This is the INSIDE box and it is 25% wide + 100px At last a use for my 'Border Writing' ... Hoorah. I have been asked the following question many, many times over the last year or two: Is it possible to set the size of a div by adding a percentage value and a pixel value, for inst

    d-o-b
    d-o-b 2006/09/26
    幅を %+Pixel で指定する方法
  • CSS Hacks

    Back to Web Devout home CSS hacks Dealing with browser inconsistencies often makes up a majority of the work for a web designer. Sometimes there is no reasonable way to accomplish a desired layout in all major web browsers without the use of some special exception rules for certain layout engines. Hacks necessarily lead to potential complications and should be avoided whenever possible, but when t

    d-o-b
    d-o-b 2006/09/26
    IE 7 の CSS ハックをいくつか。
  • Prototype.js を使った JavaScript OOP 講座 #01

    社内の精鋭エンジニアを中心に定期的に勉強会をすることになった。んで、 JavaScript の講義は僕がやることになった。 資料を社内だけでとどめておくのはもったいないので、ここに公開していきます。社内の人も社外の人も読んでください。 講義の内容は基的にソース嫁。ソースレビュー形式。 ※ターゲットは JavaScript は書いたことない、オブジェクト指向言語プログラマ。 Section 00 Prototype.js の前に JavaScript のオブジェクトの概要・・・ オブジェクトを作ってみる。 var object = {};オブジェクトにメソッドとかプロパティを追加してみる。 var object = { field: 'IT戦士', method: function() { alert('hello ' + this.field); } }; object.method()

    Prototype.js を使った JavaScript OOP 講座 #01
    d-o-b
    d-o-b 2006/09/20
    Prototype.js を使用したコードと使用しないコードの比較を用いた Prototype.js の説明。
  • 和人 - [javascript] TextBoxWatermark

    Atlas.NET覗いていたら、テキストボックスに入力してもらいたい内容を表示しておき、フォーカスがあたると消すというデモンストレーションが載っていた。 http://atlas.asp.net/atlastoolkit/TextBoxWatermark/TextBoxWatermark.aspx 英名で「Watermark」、「すかし」なんていう意味もあるようだ。 これくらいなら実装できるかなと思ってJavaScriptを書いてみた。 ライブラリとしてprototype.jsを使ってます。 TextBoxWatermark = Class.create(); TextBoxWatermark.prototype = { initialize: function(element) { this.element = $(element); this.options = Object.exte

    和人 - [javascript] TextBoxWatermark
    d-o-b
    d-o-b 2006/09/20
    テキストボックスに初期文字列(ウォーターマーク)を入れるクラス
  • line-height の値には単位なしが良いとされる理由

    CSS で行ボックスの高さを指定する line-height 値に、em(length) や %(percentage) などの単位を付けて指定しているサイトを意外と見かける。それは間違いではないし、例えばナビゲーションとかでブロック要素の垂直センターに配置するために意図的に指定しているんであれば良いんだけれど、そうでないなら line-height 値には単位なし (number) で指定した方が良いのにとか思ったりする。その理由は Eric's Archived Thoughts: Unitless line-heights でも分かりやすく説明されているんだけど、ちと劣化コピーしてみる。 単位ありと単位なしの違い 手っ取り早く説明するために、サンプルを作ってみた。p 要素があって、その中にインライン要素の em で一部分を強調している。分かりやすいようにそれぞれの font-size

    d-o-b
    d-o-b 2006/09/01
    line-height を指定したエレメント内でフォントサイズの異なる文字がある場合に表示が崩れないように。
  • Firefoxでのwindow.event

    ワールドカップの準決勝ポルトガル-フランスのせいで寝むれないmartinです。 以前のエントリで「Firefoxでの擬似window.event 」として、 function windowEvent(){ if(window.event) return window.event; var caller = arguments.callee.caller; while(caller){ var ob = caller.arguments[0]; if(ob && ob.constructor == MouseEvent) return ob; caller = caller.caller; } return null; } というのを載せていましたが、どうせなら、Firefox(および、その他のモダンなブラウザ)にも、window.eventを認識させたいです。window.eventは使い

    d-o-b
    d-o-b 2006/09/01
    IE と event オブジェクトのハンドリングを共通化する
  • IE ActiveX Change<br />"Click to activate and use this control": <noscript> solution

    In the Macromedia Forums, fpproductions came up with a clever workaround using the <noscript> tags. The solution works by getting IE to add a <noscript> just before the object, and a </noscript> just after the object, and we can then use JavaScript to read the contents of the <noscript> tag, and write it back out again. I changed fpproductions original script for that the object tag is written out

    d-o-b
    d-o-b 2006/08/28
    Flash の読み込み制限対策 with noscript タグ
  • http://aioec.sourceforge.jp/cgi-bin/wiki.cgi?page=BBS-Trac%A4%B4%B0%D5%B8%AB%A1%A6%A4%B4%BC%C1%CC%E4%B7%C7%BC%A8%C8%C4%2F29

    d-o-b
    d-o-b 2006/08/23
    Subversion Python bindingの2.3用バイナリを2.4対応にする方法
  • document.write()の実行タイミングをずらす方法

    関連エントリー: Google Adsenseの表示タイミングを制御する このサイトのppBlog's webRingのリストは、BlogPeople からdocument.writeで書き出しています。というかBlogPeopleのスクリプトがそうなっているのですが。で、document.writeが、HTMLソースの最初の方にあると、document.writeによる書き出しが終わるまで、それ以降のページのレンダリング(HTMLの書き出し)はストップした状態となります。document.writeによって呼び出している外部サーバー(ここではBlogPeople)のレスポンスが速ければ、ページ描画で待たされることはありませんが、たまにはレスポンスが遅くて、ページの残りがなかなか表示されないという事態は起こりえます。このdocument.writeは、広告バナーなどでも当たり前のように使わ

    d-o-b
    d-o-b 2006/08/23
    document.write 自体を書き換えるので呼び出し側の変更は必要ない。
  • CSS ハックまとめ Lucky bag::blog: IE7 を含むモダンブラウザ向け

    Internet Explorer 7 は、 8 月にも beta3 がリリースされるかも知れないんだけど、今現在、IE7 beta2 を含むモダンブラウザに有効そうだと思われる CSS ハックを自分用にまとめておく。以前に IE 7 用の CSS ハックを紹介したことがあったけど、今回の Easy CSS hacks for IE7 - Nano See, Nano Do で紹介されていたハックは、比較的シンプルかも知れない。想定ブラウザは下記のとおり。 バージョン 6 以下の IE IE7 それ以外のモダンブラウザ(Safari、Opera、Firefox) ブラウザごとのハック 全てのサンプルは body 要素を指定の対象としている。 バージョン 6 以下の IE にのみ適用 * html body サンプルページ バージョン 7 の IE にのみ適用 *+html body サンプ

    d-o-b
    d-o-b 2006/08/21
    ブラウザの種類ごとの切り分け