@@ -297,6 +297,7 @@ function open_topmenu(){
297
297
298
298
var q = "<?php echo $ q ; ?> ";
299
299
q = q.split("/");
300
+
300
301
if (q[0] && q[1] != ("")) {
301
302
sl = $(".sublevel[name="+q[1]+"]");
302
303
tl = $(".toplevel[name="+q[0]+"]");
@@ -601,8 +602,8 @@ function anchorAttach() {
601
602
var holdLink_inp = "";
602
603
if ($(this).hasClass("chapterCopy")) {
603
604
var chapter_embedlink = $(this).attr('name');
604
- var top_menu_link = $(".toplevelhead.activeLink_clickedOnce ").text().trim();
605
- var mid_menu_link = $(".sublevelhead.activeLink_clickedOnce ").text().trim();
605
+ var top_menu_link = $(".toplevelhead.clickedOnce ").text().trim();
606
+ var mid_menu_link = $(".sublevelhead.clickedOnce ").text().trim();
606
607
holdLink_inp = "<a href=" + "'" + chapter_embedlink + "'" + ">" +
607
608
"Learn→" +
608
609
top_menu_link + "→" +
@@ -663,8 +664,10 @@ function anchorAttach() {
663
664
// Scroll Down to Active Link in the Menu...
664
665
// ----------------------------------------------------------------------------------------
665
666
666
- var notify = $(".sublevelhead.activeLink_clickedOnce").offset();
667
- var notify = notify.top - 42;
667
+ if ($(".sublevelhead.activeLink_clickedOnce")) {
668
+ var notify = $(".sublevelhead.activeLink_clickedOnce").offset();
669
+ var notify = notify.top - 42;
670
+ }
668
671
669
672
$(".sidenav").animate({scrollTop:notify},600);
670
673
0 commit comments