jQuery cacheImage

jQuery cacheImage

Hi:


Each time I think I have a handle on jQuery plugins I run into a brick wall (largely erected by my scripting

challenged brain). 


Alex Rabarts plugin is just what I need for my video pages. 


I HAVE been able to use his Demo example on a page I created. URL for plugin at bottom.


BUT . . .


In his usage section he says to:


 $.cacheImage('/path/to/image.png');


Then add some callbacks

$.cacheImage('/path/to/image.png', {

 load : function (e) { console.log('Loaded', this, e); },

 error: function (e) { console.log('Error', this, e); },

 abort: function (e) { console.log('Aborted', this, e); }

 });


It seems simple enough but I have not been able to make it work. I don't

understand what the syntax of the entire statement should be??


<script type="text/javascript" src="http://www.rkwalton.com/scripts/jquery.cacheimage.js.txt"></script>

</script>



<script type="text/javascript">

$.cacheImage('http://www.rkwalton.com/images/large-photo2.jpg', {

                        ?????

<!-- do I need a jQuery statement BEFORE the "$.cacheImage(path)line"

 does the callback go next? 

--> 

                        ?????

</script>


I am learning very quickly that the magic performed by jQuery, js, css, and

html is all deceptively "simple" looking (to the untutored and inexperienced 

web builder).


Many thanks for your help.


 




URL for plugin documentation:


http://alexrabarts.github.com/jquery-cacheimage/