Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: take a look at this fic page problem

$
0
0
Re: take a look at this fic page problem
FoxInCloud
Re: take a look at this fic page problem
Jul. 22, 2013
01:36 pm
3U60T4U3KShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Tuvia Vinitsky

You should wrap your jQuery code into a jquery safe block:

(function ($,undefined) {// ... your jQuery related code here })(jQuery)

This ensures that everything jQuery related and soped to $ uses jQuery overriding Prototype's $ function. As long as you have no plugins that aren't noconflict aware (ie. use this same approach which is pretty standard) this should work to keep Prototype and jQuery separate. Just make sure you use non-obtrusive JavaScript for all your JS code and you'll have no problems.


You can also use jQuery.noConflict:

http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/

but frankly that's more limited although that might be a good way to make clear what's jQuery and Prototype.

+++ Rick ---

I think the problem is that with jQuery added it broke some prototype stuff. Without jQuery this works:

* note, not relevant at this point, but update function replaces html. javascript is* handled differentlyif wlAjax() AJAX.cScriptJSAdd(textmerge([$('mainmenu').update("");])) ENDIF

With jQuery running the code does not work in IE.

.. even though probably not an Fic issue, check thread 3U50Z3A6S .




Viewing all articles
Browse latest Browse all 10393

Trending Articles