background preloader

JavaScript

Facebook Twitter

Free Mini Book: Essential JavaScript Design Patterns For Beginners. JavaScript. Jsdo.it: Write Code, Share It & Get Help From Other Experts. Coders and developers, particularly ones who are not very experienced, can encounter frustrating coding problems that seem to be dead ends. If you are in a similar situation, you should stop fretting and head on over to jsdo.it. jsdo.it is a free to use website aimed at helping web developers with their day-to-day coding problems. Developers can create accounts on the site and upload the code they are working on.

The site has tools which can display the output of the code right there. You can upload your code for three purposes: simply to share it with others, collaborate on a project as a group, or tag the code as “question” and ask other accountholders for coding help. The site supports JavaScript, HTML, and CSS codes. The homepage of jsdo.it lists the most popular codes, highest ranked codes, and a daily user ranking; these listings play a vital role in making the site an active plus fun spot for web developers. Features: Check out jsdo.it @ www.jsdo.it. 5 Free Javascript Code Library Options. So what exactly is a library and why would you want to use one for JavaScript when you can do just about anything without including another file in your code? Glad you asked. Let’s try and answer that, and also have a look at some of the top JavaScript code library options available out there. Libraries When talking in terms of programming and computers, libraries generally refer to collection of re-usable code that aids you in developing your code for a particular job.

jQuery Arguably the most popular JavaScript code library out there. jQuery is called the “write less, do more” JavaScript library. $(‘#toc’).children(‘li’).addClass(‘highlight’).show(‘slow’) This is a typical jQuery one-liner that looks for a DOM element with id "toc" and then traverses its children for any "li" elements, adds a class highlight to them and unhides them while animating them slowly. Greatest strength of jQuery is DOM traversal and manipulation. Moo Tools Moo Tools offers similar capabilities as well. Ext JS. Dynamic Drive DHTML(dynamic html) & JavaScript code library. What is JavaScript and How Does It Work? [Technology Explained] Obviously a standardized implementation was needed, which led to its submission to ECMA international. Thus ECMAScript was formed.

These days, most browsers support ECMA-262 which is also more commonly (and often vaguely) known as JavaScript. What is Javascript? Javascript is rightly called the language of the Web. Each newer browser version pushes the bar higher in terms of JavaScript execution speeds. Hello World of JavaScript The Hello World example is almost customary to include when talking about programming languages. <script> document.write("Hello, World! ") You can also pop alert boxes just as easily with: <script> document.alert("Hello, World! ") Yeah, that is all you need. How It Works The browser fetches a page which might have embedded JavaScript as we saw above, or refers to a separate JavaScript file in which case that file is also fetched by the browser.

Finally, when it’s all good, the code is executed line by line. Comparing Other Programming Languages. Image Rollovers | flipping images with JavaScript onMouseOver. Path // → → IMAGE ROLLOVERS The classic image flip script is one of the most popular pieces of JavaScript on the web. Using this, you can make an image change to a different image on response to the user placing their mouse in a certain position. This is achieved by loading a new image in the original’s place. When used correctly, they can really add a bit of life to a page. You don't need to have any JavaScript experience to use these scripts; it's a simple copy ‘n’ paste job.

This page was last updated on 2012-08-21 The Image Flip Let’s get into the swing of things with an example — pass your mouse over the image below. This script is easy to configure, only requiring that you put some words in the right places and name your images correctly. Once you have assembled your images, place this JavaScript onto your page. This intimidating-looking chunk of code will be able to take care of any and all rollovers you want to set up on the page.

Break it Down One Time Inserting the Images Filenames. Email Scrambler. Email Scrambler? What the heck is that and why might I want to use it? Well, let's start with the why. Ever notice all that junk email you get? Ever wonder where they get your email address? Well, one goldmine is web pages. Someone uses a program called an email harvester that downloads the text of web pages at high speed, scans them for email addresses, and quickly gathers up an obscene number of them. Those email addresses are then sold to to your friendly neighborhood spammer. If you have a web page and your email address is on it... it's probably been picked. So, you starting to get the idea behind an email scrambler? Anyhow... below is the scrambler.