English 中文(简体)
j 图书馆与原型框架发生冲突
原标题:jQuery Library conflicts with Prototype Framework
最佳回答

You could use noConflict() like this:

jQuery.noConflict();
(function($) { 
  $(function() {
    // more code using $ as alias to jQuery
  });
})(jQuery);
//code with the other library using $
问题回答

暂无回答




相关问题
Javascript drop down menu widget

I have a menu consisting of an <ul> in a Web CMS. I want several menu items to have sub-items that are displayed in a dropdown list. These sub-items are <ul>s as well. This is basically ...

highlight div or p after loading

Hello i need to highlight a div after my page is loading, i don t know if i should use a partial or something like that, the partial also has to have 2 variables disponible. Code to highlight after ...

Turning a DIV into a click-and-drag viewport

Does somebody know an unobtrusive, Prototype or no framework based way to turn a DIV with big content (e.g. a map) into a clickable and draggable "map" container with fixed dimensions, very much like ...

bug when prototype and jQuery are both loaded

I have function in Javascript which works fine using prototype. The function is used to dynamicaly change a select field based on the selection of another field. var sizes_286 = new Array(); ...

beginner javascript question

This should be easy, but since I m new to programming, specially in javascript, I cannot figure it out. Let s say I have the following javascript code: var InjectClientValue = Class.create(); ...

How to use Scriptaculous effects on error messages

I want to use some Scriptaculous effects on error messages. <% form_for(@page) do |f| %> <%= f.label :name %> <%= f.text_field :name %> <%= f.error_message_on "name" ...

Scrolling to the bottom of a div

As part of an ajax chat room (using prototype framework) I am working on I scroll the user to the bottom each time a message is added using the below js. However if the user has scrolled up and the ...

Compare text with innerHTML IE7 problem

I can t find a work around for the innerHTML bug in IE7. I need to look at the contents of dynamicly generated HTML and change it if the text is "-1". I m using the prototype js gallery but couldn t ...

热门标签