You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Apache Wiki <wi...@apache.org> on 2007/09/07 14:02:50 UTC

[Tapestry Wiki] Update of "Tapestry5HowToIncludeJavaScript" by ErikVullings

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.

The following page has been changed by ErikVullings:
http://wiki.apache.org/tapestry/Tapestry5HowToIncludeJavaScript

The comment on the change is:
Shows how you can include your own JavaScript in T5

New page:
When you include your own JavaScript functions in a page or component, you have to take care that the formatting doesn't go awry. So I recommend you use the following approach (pay special attention to the comment tags at the start and end of the script tags:
{{{
<script type="text/javascript" language="JavaScript">
<!-- //
    // Toggle the display of a set of elements between show and hide
    function toggle() {
	  for ( var i=0; i < arguments.length; i++ ) {
		$(arguments[i]).style.display = ($(arguments[i]).style.display != 'none' ? 'none' : '' );
	  }
    }
// -->
</script>
}}}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org