Skip to content

Instantly share code, notes, and snippets.

@SunDi3yansyah
Last active November 10, 2018 06:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SunDi3yansyah/1cf8cdbb5fbd595f09ad40d727656c15 to your computer and use it in GitHub Desktop.
Save SunDi3yansyah/1cf8cdbb5fbd595f09ad40d727656c15 to your computer and use it in GitHub Desktop.
Menu Active with JS
var url = window.location;
var element = $(".ui.vertical.menu a.item").filter(function() {
return this.href == url || url.href.indexOf(this.href) == 0;
}).addClass("active").parent().parent().parent();
if (element.is("li")) {
element.addClass("active");
}
@achmiral
Copy link

achmiral commented Nov 9, 2018

Bisa di pake buat treeview di adminlte gak ya mas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment