Profile
Achievement
alberomo's Recent JavaScript Snippets
- All /
A JS function that put the focus in the form field associated to a label element whenever is clicked. The for atributte of the label element must match the id attribute of the associated form field.
It takes no arguments.
From book Dom Scripting by...
0
551
posted 12 years ago by alberomo
JS Function that style sibling elements of a given tag. Arguments: tag of the element We want siblings to style and name of the class we want to add. It needs the class to be styled (using CSS). It uses getNextElement function and addClass functions....
0
376
posted 12 years ago by alberomo
A JS function that makes bold the text of table rows ("tr" elements) when you "mouseover" them. It takes no arguments.
From book Dom Scripting by Jeremy Keith.
0
351
posted 12 years ago by alberomo
A JS function that stripes the tables ("table" elements) of a document. It takes no arguments. Add a new class ("odd") to the odd rows that needs to be styled using CSS. Use addClass function.
From book Dom Scripting by Jeremy Keith.
0
416
posted 12 years ago by alberomo
A JS function that returns the next element of a node. Argument: The node you want to know next element.
From book Dom Scripting by Jeremy Keith.
0
446
posted 12 years ago by alberomo
JS function that takes the accesskey attribute of the links of the document and display them at the end of the document. Takes no arguments.
From book Dom Scripting by Jeremy Keith.
0
360
posted 12 years ago by alberomo
JS function that add a link included in the cite attribute of the blackquote HTML element as sup element close to the blackquote. Takes no argument.
From book Dom Scripting by Jeremy Keith.
0
372
posted 12 years ago by alberomo
Description: A function that add a class to an element if the element doesn't have anyone, if it already has one, add a new class name.
Arguments: The elemento to which you want to add the class and the name of the class you want to add.
From boo...
0
719
posted 12 years ago by alberomo
Description: Execute different functions when the page loads in a better way than default onload JS event. Include it in the end of the JS document.
Arguments: Name of the function that you want to execute when the page loads.
Author: Simon Williso...
0
639
posted 12 years ago by alberomo