Tag: JavascriptParents:
Children:
-
Douglas Crockford on JavaScript: The Good Parts (via).
¶ (0)
Tags: [Javascript]
-
High Performance Web Sites :: Loading Scripts Without Blocking (via).
¶ (0)
Tags: [Javascript, Web Development]
-
"Protovis is a visualization toolkit for JavaScript using the canvas element." (via).
¶ (0)
Tags: [Javascript]
-
Stevey's Blog Rants: Rhinos and Tigers (via). A presentation about the Rhino Javascript engine on the JVM. To finish reading.
¶ (0)
Tags: [Javascript]
-
jQuery: » jQuery, Microsoft, and Nokia:
Both Microsoft and Nokia are taking the major step of adopting jQuery as part of their official application development platform. Not only will they be using it for their corporate development but they will be providing it as a core piece of their platform for developers to build with... This means that jQuery will be distributed with Visual Studio (which will include jQuery intellisense, snippets, examples, and documentation).
¶ (0)
Tags: [Javascript]
-
[squeak-dev] Using V8 for other languages (via):
One thing is clear: JavaScript is the assembly language of the Internet, at least for a few years now.
Edit: here was the thing I'd read on TraceMonkey a while back (via Simon).
Edit: One more post on TraceMonkey (to read).
¶ (0)
Tags: [Javascript]
Just learned about the W3C Selectors API from Simon's blog. Turns out a native implementation is forthcoming in Firefox 3.1 (as well as Opera, IE 8, and WebKit), but in the meantime many Javascript libraries already implement the spec, Mootools, jQuery, and Prototype to name a few.
WebKit provides a speed test of a native implementation of querySelectorAll vs popular Javascript libraries (obviously the native implementation won't work for you unless you're using a Firefox beta). It's based on Mootools' test.
-
Javascript Drag and Drop. Old, but pretty concise tutorial.
¶
Tags: [Javascript]
function getViewport(){
var e = window, a = 'inner';
if(!('innerWidth' in e)){
var t = document.documentElement
e = t && t.clientWidth ? t : document.body
a = 'client';
}
return {width: e[a+'Width'], height: e[a+'Height']}
}
Modified slightly from a comment here.
Edit: the code in that comment didn't fully implement the original, and broke when I tried it in IE. So I've updated the code above.
-
Raphaël—JavaScript Library (via).
Raphaël is small JavaScript library that should simplify your work with vector graphics on the web. In case you want to create your own specific chart or image crop-n-rotate widget, you can simply achieve it with this library.
Raphaël uses SVG and VML as a base for graphics creation. Because of that every created object is a DOM object so you can attach JavScript event handlers or modify objects later. Raphaël’s goal is to provide adapter that will make drawing cross-browser and easy. Currently library supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.
¶ (0)
Tags: [Javascript]
-
SitePen Blog » window.name Transport (via Keith and Simon). To read.
¶ (0)
Tags: [Javascript, To Read]
-
John Resig - Processing.js (via):
I've ported the Processing visualization language to JavaScript, using the Canvas element.
Impressive, to say the least.
¶ (0)
Tags: [Javascript]
-
JavaScript: The Good Parts, by Douglas Crockford (via).
¶ (0)
Tags: [Books, Javascript]
-
Reading binary files using Ajax « nagoon97’s Weblog (via).
¶ (0)
Tags: [Ajax]
-
Javascript getElementsByClass function. I know there's one built into prototype, but I didn't want to include the whole library since I wasn't already using it. This seems to work.
¶
Tags: [Javascript]
-
JSLint, The JavaScript Verifier (via).
¶ (0)
Tags: [Javascript]
-
JavaScript Kit- DOM Table Object Methods.
¶ (0)
Tags: [Javascript, Web Development]
-
Faster JavaScript Trim.
¶ (0)
Tags: [Javascript]
-
ASP.NET AJAX Control Toolkit.
¶
Tags: [ASP.NET, Javascript]
-
AppJet: Instant Web Programming (via).
¶ (0)
Tags: [Javascript, Web Development]
-
Jash: JavaScript Shell (via, via).
¶ (0)
Tags: [Javascript]
-
Simon Willison: jQuery for JavaScript programmers. Maybe I'll use jQuery instead of Prototype for future development.
¶ (0)
Tags: [Javascript, Web Development]
-
Emprise JavaScript Charts :: 100% Pure JavaScript Charts.
¶
Tags: [Javascript]
-
SproutCore (via):
Sprout Core is a application framework written in Java Script. It’s designed for creating full applications that run inside the web browser.
MIT license.
¶ (0)
Tags: [Javascript]
Some more handy Javascript (depends on Prototype):
function toggleByClass(id, className, callback){
// shows the element with id 'id'
// and hides all other elements with class 'className'
$A($$('.'+className)).each(function(element){
$(element).style.display = "none";
})
if(id) // call it with a false id to hide all
$(id).style.display = "block";
if(callback)
callback(id, className);
}
function toggleById(id1, id2){
var a = $(id1).style;
var b = $(id2).style;
if(a.display == 'none' || a.display == ''){
a.display = 'block';
b.display = 'none';
}else{
a.display = 'none';
b.display = 'block';
}
}
I always wind up needing functions to dynamically populate the options on a <select> list, or select a given item in an existing <select>. So I've finally written them out in a reusable form:
<select id="foo" onchange="alert(this.value)"/>
<script language="javascript" type="text/javascript">
function loadSelectOptions(selectId, keys, values, selectedOption){
var list = document.getElementById(selectId)
if(!list)
return;
var selectedIndex = 0;
list.length = 0;
var found = false;
for(var i=0,n=keys.length; i<n; i++){
list.options[i] = new Option(values[i], keys[i]);
if(selectedOption == keys[i]){
list.selectedIndex = i;
found = true;
}
}
return found;
}
function selectSelectOption(selectId, value, runEvent){
var list = document.getElementById(selectId)
if(!list)
return;
var options = list.options;
for(var i=0,n=options.length; i<n; i++){
if(options[i].value == value){
list.selectedIndex = i;
if(runEvent)
list.onchange();
return true;
}
}
return false;
}
loadSelectOptions("foo",['foo','bar','baz'], ['FOO','BAR','BAZ'],'baz')
var list = document.getElementById("foo")
list.remove(1)
selectSelectOption("foo","baz")
</script>
-
Because I'm sure it'll come in handy later, here's a javascript object clone function:
function clone(obj){
if(obj == null || typeof(obj) != 'object')
return obj;
var temp = {};
for(var key in obj)
temp[key] = clone(obj[key]);
return temp;
}
Update: From feedback in the comments, a better version is:
function clone(obj){
if(obj == null || typeof(obj) != 'object')
return obj;
var temp = new obj.constructor(); // changed (twice)
for(var key in obj)
temp[key] = clone(obj[key]);
return temp;
}
¶
Tags: [Code, Javascript]
-
Destroydrop » Javascripts » Tree. dTree has worked great for me so far.
¶
Tags: [Javascript, Web Development]
-
Video: Douglas Crockford, “An Inconvenient API: The Theory of the Dom” » Yahoo! User Interface Blog (via Joseph Scott). To watch later.
¶ (0)
Tags: [Javascript, Videos]
MSDN: event Object (window). In Firefox, the event object is passed as a parameter to the event handler. In IE, there's a global window.event object. To get the element that threw the event in both Firefox and IE, you can simply use:
target = event ? event.target : window.event.srcElement
where event is the name of the parameter to the function. In Firefox it's populated, in IE it's left undefined.
|
Generated in about 0.255s. (Used 11 db queries) |
I hate ASP.NET
I hate ASP... I was doing wonderswith PHP, then suddenly one of myclients...
Johnies: Mar 17, 6:14am