Cloud Zoom Maintenance Release 2.1 rev 1212051106

There is now an error handler you can specify in the options.

Currently, it receives an error for images not found. IMAGE_NOT_FOUND, but it may receive more in the future,

The error handler receives an object with the following properties:

 

  • type: type of error, e.g "IMAGE_NOT_FOUND"
  • $element: Cloud Zoom-enabled element that generated the error
  • data: some data about the error e.g. image path.

 

You can setup you own error handler by setting up an error function to call before calling CloudZoom.quickstart() e.g.

 

 

$.fn.CloudZoom.defaults.errorCallback = function(error){
    alert(error.type);
};
CloudZoom.quickStart();

 

Login or Signup to post a comment