This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #fancybox-left-ico { | |
| left: -45px; | |
| } | |
| #fancybox-right-ico { | |
| right: -45px; | |
| left: auto; | |
| } | |
| .fancybox-nav span { | |
| visibility:visible; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // && | |
| console.debug(true && true);// true | |
| console.debug(true && false);// false | |
| console.debug(false && true);// false | |
| console.debug(false && false);// false | |
| // || | |
| console.debug(true || true);// true | |
| console.debug(true || false);// true | |
| console.debug(false || true);// true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Rectangle(w, h){ | |
| this.width = w; | |
| this.height = h; | |
| } | |
| Rectangle.prototype.area = function(){ | |
| return this.width * this.height; | |
| } | |
| var r = new Rectangle(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // コンストラクタ | |
| function Circle(radius){ | |
| // インスタンスプロパティ | |
| this.r = radius; | |
| } | |
| // クラスプロパティ | |
| Circle.PI = 3.14; | |
| var c = new Circle(5.0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // コンストラクタ | |
| function Circle(){} | |
| // インスタンスメソッド | |
| Circle.prototype.area = function(val){ alert(val) }; | |
| // インスタンスを生成する | |
| var c = new Circle(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ImmutableRectangle(w){ | |
| this.getWidth = function(){ | |
| return w; | |
| } | |
| } | |
| var r = new ImmutableRectangle(100); | |
| console.debug(r.getWidth());// 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ImmutableRectangle(){} | |
| ImmutableRectangle.prototype.getWidth = function(w){ | |
| console.debug('prototypeの定義だぜ', w); | |
| } | |
| var r = new ImmutableRectangle(); | |
| r.getWidth(100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ImmutableRectangle(){ | |
| this.getWidth = function(w){ | |
| console.debug('上書きできるぜ!'); | |
| } | |
| } | |
| ImmutableRectangle.prototype.getWidth = function(w){ | |
| console.debug('prototypeの定義だぜ', w); | |
| } | |
| var r = new ImmutableRectangle(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.debug('正解!'.toString());// 正解! | |
| String.prototype.toString = function(){ | |
| return 'toStringを上書きしました!'; | |
| } | |
| console.debug('正解!'.toString());// toStringを上書きしました! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function remove_menu() { | |
| global $menu; | |
| var_dump($menu);// この中にremove_menu_page()に何を渡せばいいのかがわかる文字列が入っている。 | |
| remove_menu_page('index.php'); // ダッシュボードが消える。 | |
| } |
OlderNewer