Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter david6630

    (@david6630)

    function loadImage(container, image_url) {
    //	alert(container + ' ' + image_url);
        var img = new Image();
    	$(img).load(function () {
    		$(this).hide();
    		$(container).html(this);
    
    		$(this).queue(function () {
    			$('#loader').stop().fadeOut('fast');
    			$(this).dequeue();
    		});
    
    		$(this).fadeIn('fast');
    	}).error(function () {
    		alert('Error loading image');
    	}).attr('src', image_url); //---> .attr('src', "mywebsite.com"+image_url);
    }

    This is my own function to load image, the problem was in the last line where i add the attribute ‘src’ to my image. In my application i use relative url however “postname” permalinks change the base URL so i solved changhing to absolute url. Probably is not an elegant solution.

    Thread Starter david6630

    (@david6630)

    I solved the problem, i wanted to load my jquery library so i deregistered the default one and registered the mine but i was wrong. The solution is:
    – not deregister default jquery and register my own jquery with a different name for the array (ex. myjquery) and add all dependencies to that array.

    So you can upload every scipt and style you want via ftp in every place in wordpress folder

Viewing 2 replies - 1 through 2 (of 2 total)