{"id":708,"date":"2022-02-02T22:00:03","date_gmt":"2022-02-02T22:00:03","guid":{"rendered":"https:\/\/jmrowe.com\/blog\/?p=708"},"modified":"2022-02-02T22:00:03","modified_gmt":"2022-02-02T22:00:03","slug":"max-mega-menu-adding-a-custom-divider","status":"publish","type":"post","link":"https:\/\/jmrowe.com\/blog\/max-mega-menu-adding-a-custom-divider\/","title":{"rendered":"Max Mega Menu &#8211; adding a custom divider"},"content":{"rendered":"<p>I wanted to add a &#8220;|&#8221; character in-between elements but the only option in Max Mega Menu (MMM) is to enable a divider or not but not specify a custom divider &#8211; it only uses the border-right\/left settings.<\/p>\n<p>Their support suggested this but stated it could cause icon alignment issues &#8211; under custom CSS in MMM:<\/p>\n<pre class=\"lang:css decode:true\">@include desktop {\r\n  #{$wrap} #{$menu} &gt; li.mega-menu-item:first-child::before {\r\n    content: \"\";\r\n    display: none;\r\n  }\r\n  #{$wrap} #{$menu} &gt; li.mega-menu-item::before {\r\n    content: \"|\";\r\n    color: #fff;\r\n    display: inline;\r\n    float: left;\r\n  }\r\n}<\/pre>\n<p>I ended up using a javascript hack to get it done:<\/p>\n<pre class=\"lang:js decode:true \">jQuery(document).ready(function(){\r\n\tvar theSpan=`&lt;span class=\"whiteDivider\"&gt;|&lt;\/span&gt;`;\r\n\tjQuery(\"#mega-menu-max_mega_menu_3 #mega-menu-item-166\").append(theSpan);\r\n\tjQuery(\"#mega-menu-max_mega_menu_3 #mega-menu-item-150\").append(theSpan);\r\n\tjQuery(\"#mega-menu-max_mega_menu_3 #mega-menu-item-154\").prepend(theSpan);\r\n});<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to add a &#8220;|&#8221; character in-between elements but the only option in Max Mega Menu (MMM) is to enable a divider or not but not specify a custom divider &#8211; it only uses the border-right\/left settings. Their support suggested this but stated it could cause icon alignment issues &#8211; under custom CSS in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-708","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/posts\/708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/comments?post=708"}],"version-history":[{"count":1,"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/posts\/708\/revisions"}],"predecessor-version":[{"id":709,"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/posts\/708\/revisions\/709"}],"wp:attachment":[{"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/media?parent=708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/categories?post=708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jmrowe.com\/blog\/wp-json\/wp\/v2\/tags?post=708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}