Overriding singular navigation dropdown menu
I have a horizontal navigation with dropdown menus currently for my Sitefinity website.
I'm wanting to keep everything working exactly the same except for the first menu item. I'd like to replace the contents of the first dropdown menu with some HTML, as seen in the attached image.
I've been trying out creating a new navigation template but can't manage to target just the first menu item.
Bump. Checking to see if anyone has any thoughts?
Hello Vincent,
It is possible to change the html of only the first item in the menu through JavaScript.
Example with jQuery:
var element = $(
"li.k-item.k-first> a"
)
;
var currentHtml = element.html();
element.html(currentHtml + "Hello World");
document.querySelector(
"li.k-item.k-first> a"
).innerHTML +=
"Hello World"
;