Search results for 2014 03 10 a dom manipulation class in 100 lines of javascript

Building a Parallax Scrolling Game with Pixi.js – Part 2

by Brian Rinaldi

…make the same changes to our Mid class. Adding a setViewportX() Method to the Mid Class The Mid class’ code is almost identical to our Far class, so we’ll be…

A DOM Manipulation Class in 100 Lines of JavaScript

by Krasimir Tsonev

lines, here is what I want the DOM management class’s API to look like in the end: // returns DOM element dom(‘.selector’).el // returns the value/content of the element dom(‘.selector’).val()…

Building a Parallax Scrolling Game with Pixi.js – Part 4

by Brian Rinaldi

run. Randomizing the map wouldn’t be that difficult. Simply alter your MapBuilder class’ createMap() method so that the length and height of spans is randomly chosen. You could also throw…

Rethinking DOM Traversal

by Brian Rinaldi

…1px solid #000000; } </style> </head> <body> <table class=”board”> <tr id=”row1″ class=”row”> <td id=”cell11″ class=”cell”></td> <td id=”cell12″ class=”cell”></td> <td id=”cell13″ class=”cell”></td> </tr> <tr id=”row2″ class=”row”> <td id=”cell21″ class=”cell”></td> <td id=”cell22″…

DOM Traversal and Manipulation with Voyeur

by Brian Rinaldi

src=”js/vendor/modernizr-2.6.2.min.js”></script> </head> <body> <div class=”header-container”> <header class=”wrapper clearfix”> <h1 class=”title”>Voyeur.js Sample Site</h1> <nav> <ul> <li><a href=”http://dunxrion.github.io/voyeur.js/”>Voyeur Site</a></li> <li><a href=”https://github.com/dunxrion/voyeur.js”>GitHub</a></li> <li><a href=”https://github.com/dunxrion/voyeur.js/blob/master/Voyeur.min.js”>Download</a></li> </ul> </nav> </header> </div> <div class=”main-container”> <div class=”main wrapper…

5 things you won’t believe are only built with CSS

mm by Trevan Hetzel

100%; background: rgba(0,0,0,.75); } .modal-close { position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: default; } .modal { position: absolute; top: 50%; left: 0; right: 0; transform:…

Building a Parallax Scrolling Game with Pixi.js – Part 3

by Brian Rinaldi

pass it to the PIXI.AssetLoader class’ constructor. The PIXI.AssetLoader class triggers an onComplete event once the sprite sheet is loaded. To respond to that event we simply point the class’…

Creating Windows-8-like 3D animations with CSS3 and jQuery

by Brian Rinaldi

…the structure of the overlay pages: <div class=”page todos”> <h2 class=”page-title”>My Todos</h2> <!–content of page goes here–> <div class=”close-button”>x</div> </div> <div class=”page random-page”> <h2 class=”page-title”>Some Awesome App!</h2> <!–content of page…

JavaScript Architecture for the 23rd Century

by Jonathan Creamer

this.captain = captain; this.firstOfficer = firstOfficer; this.missionDuration = missionDuration; Starship.apply(this, [‘Federation’, ‘Star Fleet’, ‘Class 1 Heavy Cruiser’, weaponSystem]); } ConstitutionClass.prototype = Object.create(Starship.prototype); ConstitutionClass.prototype.constructor = ConstitutionClass; ConstitutionClass.prototype.warp = function(speed) { console.log(‘warping…

Why you should limit JavaScript — and how to do it

mm by Table XI

much JavaScript by writing more JavaScript. Yet, we still need JavaScript Even with its costs, there are still good reasons to use Javascript: Traditional web apps limit you to two…