Christian Heilmann is an author of books such as Beginning JavaScript with DOM Scripting and Ajax: From Novice to Professional and Web Development Solutions: Ajax, APIs, Libraries, and Hosted Services Made Easy, speaks all around world as an International Developer Evangelist for Yahoo!, and is an all around Web guru.
Christian was nice enough to give me some of his time to answer questions about the future of the web, accessibility, conferences and of course JavaScript.
read more…
I’m not a fan of creating a script that only works in one browser or differently in other browser(s). I had to create a link on a website for work that made a URL their home page. This annoying task proved difficult as there wasn’t much good information online and it seems only IE allows this. The Firefox browser will only allow you to make a web page a ‘favorite’.
So I found the code to make it work on both IE and Firefox (will not work on any other browser), as well as improving its ‘unobtrusiveness’. As you can see from the code, I only display the link if the browser is either Internet Explorer or Firefox otherwise the link text is blank.
The ‘Browser.Detect’ object is from a script from the JavaScript guru himself, PPK which detects what browser the visitor is using. Browser detection isn’t used as much today as it once was but it is still needed on some occasions.
read more…
In a recent Boagworld podcast, Paul Boag interviews John Resig, creator of jQuery. Boagworld is a weekly podcast show that talks about topics for people who design, develop and run websites.
In this snipet of the full weekly podcast, Paul asks John questions such as: when is it appropriate to use a JavaScript library; do people need to learn JavaScript before using a library, do libraries hide too much, what are some pros and cons of choosing a library, and much more.
Feel free to listen to all Boagworld’s podcasts or learn and talk to other fellow designers in their forum.
John Resig, creator of jQuery and author of Pro JavaScript Techniques, spoke at @Media 2008 in London about the different types of JavaScript libraries such as Prototype, jQuery, Yahoo! UI, and Dojo and why should one be used. John compares how each library can help the developer with DOM, Events, Animations, Ajax as well as interface widgets.
Here are the presentation slides (.pdf) he used for his talk.
I created a JavaScript online class called JavaScript: Unobtrusive Programming at LVS Online.com.
The main goal for students will be to further their basic knowledge of JavaScript and to understand how JavaScript can be developed to be more efficient by applying general programming concepts. This entails making your scripts more generic by taking the code out of the HTML container with only a reference to the external JS file with no “script” tags which is known as unobtrusive scripting.
This 6-week class will be covering many of the topics I have covered on this website, but with greater detail and, of course, includes on-one-one assistance.
The class is only $30 and there are no other materials or software needed.
Topics Covered:
Week 1: Unobtrusive Scripting: Three Layers of a Web Page
Week 2: The DOM: Referencing and Modifying Elements
Week 3: Creating a Custom Object: Encapsulating your Code
Week 4: Firebug: Debugging Your Scripts
Week 5: JavaScript Libraries: jQuery
Week 6: Ajax Basics: Understanding the XMLHttpRequest Object
To give you an idea of how each lesson looks, here is the first lesson (.pdf).
When Does Class Start?
The class runs five times a year for six weeks in January, March, May, August and October. To learn more view the course description page and contact me to find out the exact date on when you can register.
jQuery methods are used to display the hovering image labels shown underneath each thumbnail as well as display the full-size image. A background grey layer is also displayed to “disable” the other thumbnails until a “close” button is clicked. This image viewer is a little more stylish and more in tune to what you see today in other examples on the web.
And if JavaScript is disabled or not available in the browser, the image(s) will still be displayed (on a new page), so the script still retains its core functionality and stays “unobtrusive”, which really is important.
read more…
The people at Refcardz have a great cheatsheet on jQuery Selectors (.pdf).
jQuery selectors are one of the most important aspects of the jQuery library. These selectors use familiar CSS syntax to allow page authors to quickly and easily identify any set of page elements to operate upon with the jQuery library methods. Understanding jQuery selectors is the key to using the jQuery library most effectively.
Jeremy Keith and Derek Featherstone talked about how Ajax and Accessibility can live in harmony with each other at SXSW07. Topics covered include: progressive enhancement, the 3 layers of the web (content, presentation and behavior), thin vs. rich clients, XMLHttpRequest object, patterns, screen readers, and much more.
Here are their presentation notes (.pdf) as well.
Marijn Haverbeke has put together an online book titled Eloquent JavaScript that not only has some nice content, but also incorporates a really cool integrated interface for editing and running the example programs.
I would categorize these lessons as beginner to advanced so there is something for every level of developer.
read more…
A whole component of the jQuery library is dedicated to the detection and reaction of standard browser events which are likely to occur frequently (during every visit to our page) when visitors view our pages.
One event that is used almost every time the jQuery library is engaged is the ready event. This can be used with the $(document).ready(function(){});. This will execute the code within its curly braces when the document is ready (once the page has finished loading minus images).
read more…