bddb262e29ccaea9bdf08d393f81375c66e5abb6
hiram
  Mon Dec 8 16:29:59 2025 -0800
fix the toga click code to use a simple local hideToggle class refs #35776

diff --git src/hg/hgc/togaClick.c src/hg/hgc/togaClick.c
index f446ec6bb5b..9d8f957bbbf 100644
--- src/hg/hgc/togaClick.c
+++ src/hg/hgc/togaClick.c
@@ -611,55 +611,55 @@
             } else {
                 printf("<li>Middle 80 percent of CDS present: %s</li>\n", NO_);
             }
             printf("</ul></p>\n</div>\n<BR>\n");
             printf("<HR ALIGN=\"CENTER\"><h4>Query protein sequence</h4><BR>");
 
             printf("<span class='hideToggle' data-target='collapseProt' style='cursor: pointer;'>Show protein sequence of query</span>\n");
             printf("<div id='collapseProt' style='display:none;'>\n");
             printf("<p><TT>{protein seq of the query without dashes or other things. Should end with *}\n");
             printf("<BR>\n</TT></p>\n</div>\n");
 
             // and show protein sequence
             htmlHorizontalLine();
             printf("<h4>Protein sequence alignment</h4><BR>\n");
             printf("<span class='hideToggle' data-target='collapseProtAli' style='cursor: pointer;'>Show alignment between reference and query</span>\n");
-            printf("<div id=\"collapseProtAli\" class=\"panel-collapse collapse\">\n");
+            printf("<div id='collapseProtAli' style='display: none;'>\n");
             printf("<p><TT>%s</TT></p><BR>\n", info->prot_alignment);
             printf("</div>\n<BR><BR>\n");
 
             // do not forget to free toga data struct
             togaDataFree(&info);
         } else {
             // no data found, need to report this
             printf("<h3>No found data for %s</h3>\n", item);
         }
         sqlFreeResult(&sr);
     }
 
     // show inactivating mutations if required
     printf("<h4>List of inactivating mutations</h4><BR>\n");
 
     if (hTableExists(database, togaInactMutTableName))
     {
         char query[256];
         struct sqlResult *sr = NULL;
         char **row;
         sqlSafef(query, sizeof(query), "select * from %s where transcript='%s'", togaInactMutTableName, item);
         sr = sqlGetResult(conn, query);
-        printf("<a data-toggle=\"collapse\" href=\"#collapseMuts\">Show inactivating mutations</a>\n");
-        printf("<div id=\"collapseMuts\" class=\"panel-collapse collapse\">\n");
+        printf("<span class='hideToggle' data-target='collapseMuts' style='cursor: pointer;'>Show inactivating mutations</span>\n");
+        printf("<div id='collapseMuts' style='display: none;'>\n");
         printf("<table border = \"1\" width = \"640\">\n");  // init table
         printf("<tr><th>Exon number</th><th>Codon number</th><th>Mutation class</th><th>Mutation</th><th>Treated as inactivating</th><th>Mutation ID</th>\n");
         printf("</tr>\n");
         while ((row = sqlNextRow(sr)) != NULL)
         {
             struct togaInactMut *info = NULL;
             info = togaInactMutLoad(row);
             printf("<tr>\n");
             printf("<td>%s</td>\n", info->exon_num);
             printf("<td>%s</td>\n", info->position);
             printf("<td>%s</td>\n", info->mut_class);
             printf("<td>%s</td>\n", info->mutation);
             if (sameWord(info->is_inact, ONE_)){
                 printf("<td>%s</td>\n", YES_);
             } else {
@@ -673,32 +673,32 @@
         printf("</table>\n");
         printf("</div>\n<BR>\n");
     } else {
         printf("<B>Sorry, cannot find TOGAInactMut table.</B><BR>\n");
     }
 
     // show exons data
     htmlHorizontalLine();
     printf("<h4>Exon alignments</h4><BR>\n");
 
     if (hTableExists(database, togaNuclTableName))
     {
         char query[256];
         struct sqlResult *sr = NULL;
         char **row;
-        printf("<a data-toggle=\"collapse\" href=\"#collapseExons\">Show exon sequences and features</a>\n");
-        printf("<div id=\"collapseExons\" class=\"panel-collapse collapse\">\n");
+        printf("<span class='hideToggle' data-target='collapseExons' style='cursor: pointer;'>Show exon sequences and features</span>\n");
+        printf("<div id='collapseExons' style='display: none;'>\n");
         sqlSafef(query, sizeof(query), "select * from %s where transcript='%s'", togaNuclTableName, item);
         sr = sqlGetResult(conn, query);
 
         while ((row = sqlNextRow(sr)) != NULL)
         {
             struct togaNucl *info = NULL;
             info = togaNuclLoad(row);
             printf("<h5>Exon number: %s</h5><BR>\n", info->exon_num);
             printf("<B>Exon region:</B> %s<BR>\n", info->exon_region);
             printf("<B>Nucleotide percent identity:</B> %s | <B>BLOSUM:</B> %s <BR>\n", info->pid, info->blosum);
             if (sameWord(info->gaps, ONE_)){
                 printf("<B>Intersects assembly gaps:</B> %s<BR>\n", YES_);
             } else {
                 printf("<B>Intersects assembly gaps:</B> %s<BR>\n", NO_);
             }
@@ -712,23 +712,19 @@
             printf("<BR>\n");
             printf("<B>Sequence alignment between reference and query exon:</B><BR>\n");
             printf("%s<BR>\n", info->alignment);
             togaNuclFree(&info);
         }
         sqlFreeResult(&sr);
         printf("</div>\n<BR><BR>\n");
     } else {
         printf("<B>Sorry, cannot find TOGANucl table.</B><BR>\n");
     }
 
     htmlHorizontalLine();
 
     // TODO: check whether I need this
     printf("%s", hgTracksPathAndSettings());
-    hPrintf("<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css\">");
-    hPrintf("<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js\"></script>");
-    hPrintf("<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js\"></script>");
-
 
     printTrackHtml(tdb);  // and do I need this?
     hFreeConn(&conn);
 }