summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStella Power2007-11-26 14:19:51 (GMT)
committer Stella Power2007-11-26 14:19:51 (GMT)
commit8ba72e971a2c6a7da86f96f9ee55985450e5e88f (patch)
treefb6e4d0a588aa83409a0f29720bd18f8ac727708
parent1d80e3a9cec15b1f86dbe297d1207fe4f6ac59de (diff)
move call to inialize lightbox in from lightningload.js
-rw-r--r--js/lightbox.js4
-rw-r--r--js/lightbox_lite.js32
2 files changed, 6 insertions, 30 deletions
diff --git a/js/lightbox.js b/js/lightbox.js
index 4d81d23..439d9f1 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -663,4 +663,6 @@ var Lightbox = {
}
};
-function initLightbox() { Lightbox.initialize(); }
+Drupal.behaviors.initLightbox = function (context) {
+ Lightbox.initialize();
+};
diff --git a/js/lightbox_lite.js b/js/lightbox_lite.js
index cea532d..fa7169f 100644
--- a/js/lightbox_lite.js
+++ b/js/lightbox_lite.js
@@ -22,11 +22,6 @@
* - showLightbox()
* - hideLightbox()
* - initLightbox()
- * - addLoadEvent()
- *
- * Function Calls
- * - addLoadEvent(initLightbox)
- *
*/
@@ -364,27 +359,6 @@ function initLightbox() {
}
-
-
-
-// addLoadEvent()
-// Adds event to window.onload without overwriting currently assigned onload
-// functions.
-// Function found at Simon Willison's weblog - http://simon.incutio.com/
-function addLoadEvent(func) {
- var oldonload = window.onload;
- if (typeof window.onload != 'function') {
- window.onload = func;
- }
- else {
- window.onload = function() {
- oldonload();
- func();
- }
- }
-
-}
-
-
-
-//addLoadEvent(initLightbox); // run initLightbox onLoad
+Drupal.behaviors.initLightbox2 = function (context) {
+ initLightbox();
+};