Alex Rabarts cache image plugin
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).
I HAVE been able to use his Demo example on a page I created. URL for ducumentation at bottom of post.
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 actual 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.
Dick
http://alexrabarts.github.com/jquery-cacheimage/