+
+ // Minimize all tab content wrapper and activate only the selected
+ // tab panel.
+ $('#profile-jot-form > [role=tabpanel]').addClass("minimize").attr("aria-hidden" ,"true");
+ $('#' + tabpanel).removeClass("minimize").attr("aria-hidden" ,"false");
+
+ // Set the aria-selected states
+ $("#jot-modal .modal-header .nav-tabs .jot-nav-lnk").attr("aria-selected", "false");
+ elm.setAttribute("aria-selected", "true");
+
+ // For some some tab panels we need to execute other js functions.
+ if (tabpanel === "jot-preview-content") {
+ preview_post();
+ // Make Share button visivle in preview
+ $('#jot-preview-share').removeClass("minimize").attr("aria-hidden" ,"false");
+ } else if (tabpanel === "jot-fbrowser-wrapper") {
+ $(function() {
+ Dialog.showJot();
+ });
+ }
+
+ // If element is a mobile dropdown nav menu we need to change the botton text.
+ if (cls) {
+ toggleDropdownText(elm);
+ }