Maybe you need learn some of _javascript_ basics and jQuery notation.

The plugin normally is in a separate file, althought you can write the plugin
code in your program code:

in HTML code:
<script type="text/_javascript_" src="" jquery.js"></script>
<script type="text/_javascript_>
/* the Plugin here */
$.fn.image = function(src, f){....}

/* start code of this page */
$(document).ready(function(){
  $("#imagecontainer").image(" oranges.jpg",function(){
      alert("The image is loaded");
  });
});

</script>
....
<body>
 <div id="imagecontainer"></div>
</body>

2006/8/15, Braveheart <[EMAIL PROTECTED]>:

I guess this is what I was looking for.
Anyway I don't know almost anything about _javascript_ and I started using it
since I found out about AJAX
So can you explain me better for how to implement it?

Here is my example how I tried using it:

$(document).ready(function(){
        // The plugin
        $.fn.image = function(src, f){
        return this.each(function(){
                var i = new Image();
                        i.src = ""
                        i.>                        this.appendChild(i);
                });
        }

        // The code for the image to load
  $("div#container").image(" oganges.jpg",function(){
        alert("The image is loaded now");
        });
});
--
View this message in context: http://www.nabble.com/how-to-load-images-with-jquery-ajax--tf2108823.html#a5818756
Sent from the JQuery forum at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to