0

I have installed Ajaxim 3.4 ...working fine with standalone but having issue with my existing site....ajaxim prototype conflicts with JQuery....and so stop my jquery functionality.

IS there ajaxim script with JQuery too....no prototype version.

Any help will be appreciated.

Thanx in advance.

1 Answers1

1

Prototype isn't as accomodating, but jQuery can be set up to use a different identifier than $:

var $j = jQuery.noConflict();

// Use jQuery via $j
$j(document).ready(function(){
    $j("div").hide();
});

// Use Prototype with $(...), etc.
$('someid').hide();

Source: http://docs.jquery.com/Using_jQuery_with_Other_Libraries

This way both libraries can be used side by side.

Now if your own code all works using the $ sign for jQuery calls, you can still use that identifier in your own code, by wrapping it in onload-methods:

jQuery(function ($) {
    // Use jQuery with the standard $ sign in this scope,
    // even if it is assigned to prototype outside of this scope
    $('#id').whatYouWant();
});
René Wolferink
  • 3,558
  • 2
  • 29
  • 43
  • thnx....i have ajaxim 3.4.1 ...its using prototype....i can't make changes in JQuery script as its hard for me to change throughout the site. – user2170021 Mar 14 '13 at 13:55