1

I have parent.jsp, which contains prototype.js. The parent.jsp contains a link , which loads contents from child.jsp, but the child.jsp contains jquery.js. Now prototype is conflicting with jquery and i get a whole lot of errors in internet explorer and one error in mozilla firefox.

Most of internet explorer problems are referring to $ symbol and document.body.appendChild().

The mozilla firefox is giving this error:

typeerror value does not implement interface node in this line of prototype :

var query= document.evaluate(expression, $(parentElement) || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);

Can any one suggest how to solve this problem ? I have googled a lot, given noConflict for jquery, still nothing is working .

4

3 に答える 3

1

jQuery noConflict ドキュメントを参照してください: http://api.jquery.com/jQuery.noConflict/#example-1

子ページで次の例を使用します。

jQuery.noConflict();
(function($) {
  $(function() {
   // put your jquery code in here
  });
})(jQuery);
// other code using $ as an alias to the other library
于 2013-05-23T11:28:08.323 に答える