jQuery doesn't work on new hosting I'm using small jQuery script to change src argument on img tag. It works without any problems on my hosting but after migrating website on client's hosting this script doesn't work at all.

I have checked with Firebug and the script is there. I also tried to access to [website]/misc/ui/jquery.ui.core.min.js in browser and jQuery is shown. I tried to install jquery_update module and change versions of jQuery (with and without CDN). None of this helped.

I noticed on 'Status report' page warning because of PHP mbstring extension.



Is this could be the possible reason for not working?

In Firebug my script shows like:

&lt;script&gt;&lt;![CDATA[
]]&gt;&lt;!--//--&gt;&lt;![CDATA[// &gt;&lt;!--

jQuery(document).ready(function() {
    var img;
        img = '/sites/all/themes/ave/img/logo2.png';
        jQuery('.logo-img a img').attr("src", img);
    });

//--&gt;&lt;!]]&gt;&lt;![CDATA[
]]&gt;&lt;/script&gt;


Do you have some ideas or maybe similar experience?
Your issue is in this line

img = '/sites/all/themes/ave/img/logo2.png';


It should be something like this:

img = location.protocol + "//" + location.host + '/sites/all/themes/ave/img/logo2.png';


and if that does not work just inspect the src param of the image and adjust accordingly.

And perhaps replace the whole script with this:

(function ($, Drupal, window, document, undefined) {
    Drupal.behaviors.MYMODULE = {
        attach: function(context, settings) {
            var img = location.protocol + "//" + location.host + '/sites/all/themes/ave/img/logo2.png';
            $('.logo-img a img').attr("src", img);

        }
    };

})(jQuery, Drupal, this, this.document);