diff client/digitallibrary/jquery/jquery-test-full.html @ 760:f0be4432f515 jquery

primitive plugin extension mechanism - unsure how useful this is
author hertzhaft
date Tue, 08 Feb 2011 23:57:39 +0100
parents 4c0cc97a6399
children aab01da232ef
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery-test-full.html	Sun Feb 06 22:17:41 2011 +0100
+++ b/client/digitallibrary/jquery/jquery-test-full.html	Tue Feb 08 23:57:39 2011 +0100
@@ -36,7 +36,17 @@
                     interactionMode : 'fullscreen',
                     scalerBaseUrl : 'http://digilib.biblhertz.it/digilib04/servlet/Scaler'
                     };
-                 $('div.digilib').digilib(opts);
+                var $div = $('div.digilib');
+                $div.digilib(opts);
+                var obj = {
+                    'initExtension' : function() {
+                        var settings = $(this).data('digilib').settings;
+                        console.debug('initExtension:', this, 'settings:', settings);
+                        },
+                    'options' : { 'test' : 'content of option "test"' },
+                    };
+                $div.digilib('extendPlugin', obj);
+                $div.digilib('initExtension');
             });
 
         </script>