Monday, 14 November 2011

Well Behaved Javascript

Javascript


This week we've covered Javascript. For me this is the most exciting thing we've covered so far on the course as I've had very little exposure to it before. I have created sites that have used JQuery plug-ins - a Javascript library that helps simplify coding but until now had not written any code. Javascript enables web pages to respond to events such as the web page loading or a click of a mouse on a button.


Here is a link to a prototype of my personal site landing page. I've written some code (with the help of the W3Schools tutorial) that reacts to the browser window either loading, or being resized, and changes the font size based on the width of the screen. (Other responsive elements are created by using percentages (eg. Width = 100%) in the CSS).


Lab Sessions


In the lab sessions we looked at some examples of event driven Javascript and I created a Miles to Kilometers converter and an example of an onMouseOver event.


Additions to the blog

I've made a few additions to the blog in the form of gadgets. I've added a pop-up form for subscribing to the feedburner. This involved editing the HTML of the blog rather than adding in a HTML/Javascript gadget as the notes on the lab session exercise. It's interesting to see the options from the template designer are being used as variables in the Javascript for the page.

No comments:

Post a Comment

x

Get Our Latest Posts Via Email - It's Free

Enter your email address:

Delivered by FeedBurner