Jquery :: Conflict Between Libraries - Mootools And Prototype
Feb 23, 2011
I have been trying in vain for many days to resolve a conflict between javascript libraries. My homepage uses jquery horizontal css menubar + a combined mootool and prototype accordian type sliding information box in the middle of the webpage. I find that the highlighter of the css menubar does not work when prototype.js is also loaded on the same page. I have read somewhere that $ should be replaced however I have tried every possible option and none works. I have jquery loading first as it is on my template, with this:
<script type='text/javascript' src='../Web/Templates/jquery-1.3.2.js'></script>
<script type='text/javascript' src='js/example.js'></script>
And my mootool and prototype loades further below like this:
<script type="text/javascript" src="scripts/intro/prototype.lite.js"></script>
<script type="text/javascript" src="scripts/intro/moo.fx.js"></script>
<script type="text/javascript" src="scripts/intro/moo.fx.pack.js"></script>
<script type="text/javascript">
function init(){
var stretchers = document.getElementsByClassName('box');
var toggles = document.getElementsByClassName('tab');
var myAccordion = new fx.Accordion(
toggles, stretchers, {opacity: false, height: true, duration: 600}
);
//hash functions
var found = false;
toggles.each(function(h3, i){
var div = Element.find(h3, 'nextSibling');
if (window.location.href.indexOf(h3.title) > 0) {
myAccordion.showThisHideOpen(div);
found = true;
}
});
if (!found) myAccordion.showThisHideOpen(stretchers[0]);
}
</script>
I have a conflict between Mootools (Slimbox) and jQuery (easyListSplitter). I can't get them to work together. I was reading about jQuery.noConflict();, but I find it quite complicated to implement.
On my website: [URL], I have a scrolling logo script that uses Mootools and a tabbed AJAX content script using jQuery. I can't get the two to play well, because as you can see, the tabbed content at the bottom is not working correctly. I've tried the jQuery.noConflict(); code and wrapping the jQuery in: (function($) { /* some code that uses $ */ })(jQuery) ... But to no avail.
Prototype.js and mootools.js working fine individual. But when I am trying to use both of them (prototype.js and mootools.js) together so it is not working. This is my code....... <html> <head> <link rel="stylesheet" media="screen" href="../calendar/styles/vlaCal-v2.1.css" type="text/css" /> <link rel="stylesheet" media="screen" href="../calendar/styles/vlaCal-v2.1-adobe_cs3.css" type="text/css" /> <link rel="stylesheet" media="screen" href="../calendar/styles/vlaCal-v2.1-apple_widget.css" type="text/css" />
I think I'm having a library conflict, but as I don't know javascript, I'm finding it difficult to resolve.
In my document I have an animated navigation using superfish.js [URL].. I also have an accordion menu which uses effects.js and prototype.js. The animated navigation was working before, however after adding the effects.js and protoype.js the menu drop downs only appear and don't animate.
Is this a library conflict and if so howdo I fix it?
I'm with conflict between mootools and jquery, I found something on the internet but seucesso. Can anybody tell me which file and which line change to end this conglito change?
Ok, my jq slider is clashing with light box. Found the answer here: [URL]...but don't know where to insert my code within my head below for it to work ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!--Twitter Feed--> <script type="text/javascript" src="http://twitterjs.googlecode.com/svn/trunk/src/twitter.min.js"></script>
This is slightly off topic, but if anybody can solve this, it'll be this mailing list. The basic question is: Is there a way to catch an error thrown in an external js library so that I can continue parsing the remaining javascript on the page? The more detailed version is this: I'm using DotNetNuke (DNN) for my website. A module that I'm using include Scriptaculous, DotNetNuke uses a mixture of jQuery and MS AJAX. To avoid namespace pollution, the DNN folk have used the jQuery prefix for jQuery functions and the $ shortcut for MS AJAX (actually, I think this is the only way you can do this). The third party module uses $ to reference Scriptaculous. I think we all know where this is going: the namespace pollution of $ causes an error to be thrown very early on, leaving parts of my page unstyled (cornerz), dates unformatted, etc, etc, etc. The good news - for me - is this only happens when an admin is logged in. My thought would be to catch the errors and continue parsing <i>my </i>portion of the page.
According to ECMAScript, the root of the prototype chain is Object.Prototype. Each object has an internal property [[Prototype]] that could be another object or NULL.... However, it also says that every function has the Function prototype object: Function.Prototype, it confused me, because a function is an object, for a function object, what is its function prototype and object prototype..For example:
var x = function (n) {return n+1;};
what is the relationships of x, Object.Prototype and Function.Prototype
I am trying to get to the bottom of javascript object, prototypes etc. I have a fairly good grasp of it, but I get confused the closer I get to the base object.prototype. FIrst of all, I was under the impression that all objects descend directly from Object. But some objects (like Array) seem to inherit properties and methods from the function.prototype. So does this mean that the chain is like this:
object -- function -- array Second, I noticed (on the mozilla javascript reference site that object.prototype inherits properties and methods from function.prototype and vice versa!? How can this be? I must be missing something important about understanding the chain?
I want to do something with JavaScript on my website but don't know how to implement it, but i've found it has already been written by someone and is available to download free as they've put it on net. So is it right morally to use something that someone has already been written? does this count as cheating? does it infringe any copyright?
I'm interested in finding some JSON libraries for javascript that contain a stringifier and/or parser. I've been using what appears to be the reference implementation from json.org (written by Douglas Crockford?), but I'm running into two problems:
(1) The lack of support for the hasOwnProperty method in Safari
(2) Odd, intermittent errors in Gecko browsers, something to the effect of "llegal operation on WrappedNative prototype object."
If anyone's familiar with other libraries, or with ideas for working with these issues in using the json.org library, I'd love to hear about them.
There is this technology used in this great website that doesn't stop amusing me, I was just hoping someone could cypher the technology behind it and perhaps reveal it is done with the help of some freely available Library the link to this DSL Internet provider company is:
[URL]
just insert this postal zip code in there to test the service: 68161that is a German Zip coad for the city Mannheim.
I need to use a couple of third-party Javascript libraries which have multiple JS files. Since @require doesn't work on Chrome, how can I add multiple external JS libraries to a userscript? I'm considering all the possibilities before choosing one.I know you can add jQuery using this method. I have personally used that. But all my other code would have to run inside the main function of this code! I think that would be a problem when there are many libraries to work with.
I was wondering if there are any proper, robust libraries or functions/methods that I don't know of that will escape all the problematic characters such as single quotes and tabs.
I find myselfwriting x = x.replace(/'/g,"'"); and the reverse over and over again. Shouldn't Javascript have a built in method to do this? I know of the escape() function but I am not sure if this is more for urls. What is the real world way of storing such an "escaped" variable in a database that will later be read into a javascript variable? :-/
Maybe one could use escape() and unescape() in some way, but some expert probably could answer this in a snap.
The topic of event handler management has been covered in many places in the past. One location is in the contest by PPK (http:[url]....). The winning submission by John Resig (http:[url]...._and_the_winner_1.html) has a few problems, and the commentary on the site seems to gravitate to the implementation by Dean Edwards (http://dean.edwards.name/weblog/2005/10/add-event2/) after the analysis of the Resig code.I was also able to find a few more implementations on stackoverflow from: Bill Ayakatubby (http:[url]....) and Marco Demaio [url].....
Outside of the JavaScript frameworks, what is generally done for supporting event functionality? There are numerous options each with their own benefits and drawbacks. I'm uncertain of which one to use myself. Is there an undeclared de facto?
I've decided to use the drag and drop option for my gadgets in my home page. The size of the gadgets may vary and user may choose the gadgets and choose the place too. Is there any api or libraries which I can easily configure the drag and drop option in js and php.
Are there any good web UI component libraries -open source or commercial - that you can recomment? They need to be cross browser compatible and have good documentation. Jquery UI is very good but limited in number of controls it offers. YUI is very verbose and very hard to use. extJs only other one I can think of. Any others you use and like?
At the moment I am playing with jQuery a bit. Is it possible to get the same effect like the following one from Mootools with jQuery? Mootools: When using jQuerys slideDown effect you don't get exactly the same. On jQuery when you slide down some text. The text doesn't get created befor it slides in. (well it looks like that)
I have two different scripts I am using on a web form, one which highlights the field when the mouse focuses on a field and another which checks the info and submits. They work fine separately, but together there is a conflict.how to resolve the conflict?Here are the two scripts.
I have read that if i have to use jquery with other libraries then i have to use jquery in no conflict mode.I understand that and and it works. i use$j = jquery.noconflict()so that $ of jquery does not mix with $ of other librariesNow my question is that i use any jquery plugin , and i include that JS filee,g plugin.jquery.jsI am not sure whether i am correct or noti think that plugin is coded by using $ sign not the $jnd i think it will conflict with other libraries.So it means i have to chnage the plugin code as well or there is no need to change plugin