styleElementSiblings Function


/ Published in: JavaScript
Save to your folder(s)

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.

From book Dom Scripting by Jeremy Keith.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.