Update of /var/cvs/contributions/didactor2/src/core/templates/core/js
In directory james.mmbase.org:/tmp/cvs-serv12300
Modified Files:
Didactor.js
Log Message:
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/templates/core/js
Index: Didactor.js
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/templates/core/js/Didactor.js,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- Didactor.js 6 Mar 2009 11:00:07 -0000 1.20
+++ Didactor.js 6 Mar 2009 11:20:39 -0000 1.21
@@ -6,7 +6,7 @@
* One global variable 'didactor' is automaticly created, which can be be
referenced (as long as the di:head tag is used).
* @since Didactor 2.3.0
* @author Michiel Meeuwissen
- * @version $Id: Didactor.js,v 1.20 2009/03/06 11:00:07 michiel Exp $
+ * @version $Id: Didactor.js,v 1.21 2009/03/06 11:20:39 michiel Exp $
*/
@@ -316,8 +316,12 @@
number = type;
type = null;
}
- var navigationElement = $("#a_" + number);
+ var navigationElement = $("#a_" + number)[0];
+ if (this.currentNavigationElement == null) {
+ // For some reason, e.g. on intial load and 'default 'navigation
element is not yet known, try to determin it.
+ this.currentNavigationElement =
$(navigationElement).siblings("a.active");
+ }
if (this.currentNavigationElement != null) {
$(this.currentNavigationElement).removeClass("active");
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs