Drupal behaviors with non-core jquery For various reasons I am currently working on a module with a version of jQuery and jQuery UI that is not core. In other words,

scripts[]=js/jquery.js
scripts[]=js/jquery-ui.js


are declared in the .info file. While this gives me the correct look and feel of my module, the form callbacks I used previously with Drupal.behaviors are not working anymore.

My first approach was to remove the (function($) {...})(jQuery); enclosures in the Drupal.behaviors function, to no avail. 

My question is then: Is there a way to write these callbacks using standard (non-Drupal) jQuery or do I have to refactor everything 'the drupal way?' 

Here is what I have on the .module side:

function        ggent_form($form, &amp;$form_state) {

$form['Input type'] = array(
    '#type'=&gt;'fieldset',
    '#title'=&gt;'Upload your image'
);

$form['Input type']['file'] = array(
    '#type' =&gt; 'managed_file',
    '#title'=&gt; t('Upload image'),
    '#description' =&gt; t('An optional description'),
    '#upload_validators' =&gt; array(
        'file_validate_extensions' &gt; array('gif png jpg jpeg'),
        'file_validate_size'=&gt;array(512*512*512),
    ),
    '#upload_location'=&gt;'public://',

);

$form['Input type']['submit'] = array(
    '#type'=&gt;'submit',
    '#value' =&gt;t('Submit'),
 '#ajax' =&gt; array(
            'callback'=&gt; 'ggent_update_image_callback',
            'wrapper'=&gt;'mywrapper'
        ),
);

return $form;
}

///*
// * Form callbacks
// */
function        ggent_update_image_callback($form,$form_state) {
$picture_settings = array( 
    'image' =&gt; file_create_url($form['Input type']['file']['#file']-&gt;uri)
    );
    drupal_add_js(array('ggent' =&gt; $picture_settings),'setting');
    return;


Which should send to my .js file to be used as:

    if (input_type === 'image') {
        img.src = '....../standardbg.png';
        Drupal.behaviors.imgupload = {
            attach: function( context, settings ) {
                if (typeof Drupal.settings.ggent.image!=='undefined' &amp;&amp; img.src !== Drupal.settings.ggent.image) { //typeof img.src !== 'undefined' &amp;&amp; 
                    img.src = Drupal.settings.ggent.image;
                }
            }
        };
    }


But this doesn't work. The Drupal.behaviors event doesn't fire at all! Any suggestions would be greatly valued.
EDIT: Updating my jQuery using the suggested module does nothing.
If for some reason you need multiple versions of jQuery you can use the jQuery Multi module:

(libraries module is also required)
and you put the different version in the libraries directory
then you wrap your JavaScript code in something like this:

(function($) {...})(jqxxxxx);


where jqxxxxx is the version of jQuery you are using (see the documentation of jqmulti for more info)

do not include jquery scripts like you did. JQury Multi will do it automatically for you