Skip to Main Content
MooTools 1.3 Cookbook
book

MooTools 1.3 Cookbook

by Jay L Johnston
July 2011
Intermediate to advanced content levelIntermediate to advanced
276 pages
5h 11m
English
Packt Publishing
Content preview from MooTools 1.3 Cookbook

Creating an "A" tag link that alters the src of an IFRAME

Imagine how our alarm clock works. We set a listener, so to speak, on the device such that it listens and waits for the action of the time we wish to receive an alarm. In our HTML DOM, we can add listening events as properties when we create an element. When the listener is fired, the defined action will execute!

How to do it...

Create an anchor tag, set a listener on it, and define the action to take when the listener is activated, in other words, do something when the link is clicked:

<iframe id="miframe" src="http://bing.com" width="800" height="400"></iframe> <style type="text/css"> a { cursor:pointer; display:block; color:#00F; text-decoration:underline; font-size:20px; } </style> <noscript>JavaScript ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Web Performance

Jump Start Web Performance

Craig Buckler

Publisher Resources

ISBN: 9781849515689Other