Archive for the ‘web development’ Category
Refresh Current Page in JavaScript
It’s more annoying than it sounds. You could do the classic:
window.location = window.location; //refresh lol!
But you’ll get screwed if there is a fragment, like, say, http://example.com/index.html#section1. The page won’t refresh. Or rather, it will, but browsers won’t send a request to the server if the url contains a fragment. It will just try to navigate [...]
May 9, 2010
Posted in: javascript, web development
2 Comments
Seven CSS Tricks No One Should Ever Have to Memorize
CSS is kinda cool, or at least it would be if everybody used the same browser. Instead, they don’t, so doing stuff with CSS is mostly impossible. There are few super annoying hacks and tricks that I use every six months but can never remember, and then end up scouring the internet looking for an [...]
May 1, 2010
Posted in: web development
2 Comments
Get Computed Style in JavaScript
The computed style of an element incorporates external CSS (via stylesheets), inline styles and styles prescribed via JavaScript. It’s most commonly used to get the default style of an element if it’s not specifically assigned via styles, i.e. the default style that the browser gives an element. It’s a very undocumented part of JavaScript engines, [...]
April 5, 2010
Posted in: javascript, web development
No Comments
Fluent DOM Manipulation in JavaScript
Everybody hates the DOM. Except me. I kinda love it. I get a little hit of endorphins every time I type all 23 characters of “document.getElementById”. I need a cigarette.
Anyway, I found myself dissatisfied with the state of jQuery’s DOM manipulation (hint: there isn’t any). You can traverse, and do stuff with events, but [...]
November 19, 2009
Posted in: javascript, web development
2 Comments
