[Mapbender-commits] r6295 - trunk/mapbender/lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jun 17 08:16:32 EDT 2010
Author: christoph
Date: 2010-06-17 12:16:32 +0000 (Thu, 17 Jun 2010)
New Revision: 6295
Modified:
trunk/mapbender/lib/wizard.js
Log:
Modified: trunk/mapbender/lib/wizard.js
===================================================================
--- trunk/mapbender/lib/wizard.js 2010-06-17 12:08:16 UTC (rev 6294)
+++ trunk/mapbender/lib/wizard.js 2010-06-17 12:16:32 UTC (rev 6295)
@@ -7,34 +7,35 @@
fade: false
}, options || {});
+ var clickHandler = function (e, $m, $t) {
+ $m.hide();
+ $t.show();
+ e.preventDefault();
+ };
+
+ if (o.fade) {
+ clickHandler = function (e, $m, $t) {
+ $m.fadeOut(function () {
+ $t.fadeIn();
+ });
+ e.preventDefault();
+ };
+ }
+
return this.each(function () {
var $module = $(this);
- $module.find("a").each(function () {
- var $link = $(this);
- var href = $link.attr("href");
+ $("a", $module).live("click", function () {
+ var href = $(this).attr("href");
var $target = $(href);
- console.log($target);
if ($target.size() === 0) {
return;
}
+
+ $link.bind("click", function (e) {
+ clickHandler(e, $module, $target);
+ });
- var clickHandler = function (e) {
- $module.hide();
- $target.show();
- e.preventDefault();
- };
-
- if (o.fade) {
- clickHandler = function(e){
- $module.fadeOut(function () {
- $target.fadeIn();
- });
- e.preventDefault();
- };
- }
-
- $link.bind("click", clickHandler);
- });
+ });
});
};
\ No newline at end of file
More information about the Mapbender_commits
mailing list