04-22-2009, 03:45 PM
|
#9 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by CoryMathews
I would suggest going to w3schools.com and learning how the html dom works. Then javascript will become much easier. But I would not spend to much time with the basic javascript and would jump right into a framework such as jquery.
|
that's exactly where I've been the last couple of days. I need to learn the fundamentals and get a complete understanding before I jump into a framework. I'm not sure which is a good one out there, there are so many!!
Quote:
Originally Posted by sketchMedia
Well, most languages these days have syntax that look similar to C, including PHP. However with Javascript there are a few things that differ to PHP (well in the current version of PHP in any case) like closures, lambda functions,o bject literals etc
javascript Code:
obj = { var : 'test', print: function() { alert(this.var); } }; obj.print();
javascript Code:
var obj = function () { function doAlert(str) { alert(str); } return { var : 'test', print : function() { doAlert(this.var); } }; }(); obj.print();
javascript Code:
obj = function(){alert('Self invoked!'); }();
javascript Code:
getName = function(){ namesArray = ['sam', 'ben', 'john','dave']; return function(n){ return namesArray[n]; }; }(); alert(getName(2));
Can't say I agree, I think a good understanding of how the language works (and ultimately how the framework works) is essential for performance if nothing else.
|
Thanks for the examples, I'll have to break those down and try to understand them. The format looks pretty foreign to me...
|
|
|
|