[ANN] NoConflict Action

There have been an increasing number of people getting Prototype in their jQuery, and vice versa, lately. Here’s an Action that can help you get the noConflict() function into place when you do this.

http://actionsforge.com/actions/view/305-noconflict

Note carefully: you cannot use this Action to rescue hand-coded script tags (anything you put into the Page / HTML Markup dialog). You can only rely on this Action if you used the External JavaScript Action to attach jQuery to your page, and Protaculous or any of the FX or Scripty Actions to add Prototype.

The Action loops through your page’s script tags, and looks for jQuery, Prototype, and $.noConflict(). If it finds two out of three, or all three but in the wrong order in the page head, it will re-arrange the page to ensure that they are in this order:

<script src="path/to/prototype.js" ...></script>
<script src= "path/to/jquery.js" ...></script>
<script type="text/javascript">
	$.noConflict();
</script>
... any other scripts here ...

Hope this helps, although I really hope you won’t need it. One Library per Page, please!

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just for the uninitiated, like myself, in what instances might this conflict occur.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

in what instances might this conflict occur.

When you are mixing javascript libraries on a single page.

ie adding Wowslider or a jQuery plugin powered effect to a page that uses native FW actions (which are script/protaculous based).

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options