From d1fe1ad45f8bd19fb710eea9ceb2fe977ddf712f Mon Sep 17 00:00:00 2001 From: Volker Kemeter Date: Mon, 11 Jun 2018 14:00:11 +0200 Subject: [PATCH] [FEATURE] make wrapper tag configurable added an option to make the wrapper tag configrable. in my case change from div to nav. --- jquery.slicknav.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jquery.slicknav.js b/jquery.slicknav.js index 50c490b..f38ed60 100644 --- a/jquery.slicknav.js +++ b/jquery.slicknav.js @@ -12,6 +12,7 @@ prependTo: 'body', appendTo: '', parentTag: 'a', + wrapperTag: 'div', closeOnClick: false, allowParentLinks: false, nestedParentLinks: true, @@ -112,7 +113,7 @@ // create menu bar $this.mobileNav.attr('class', prefix + '_nav'); - menuBar = $('
'); + menuBar = $('<'+ settings.wrapperTag +' />').addClass(prefix +'_menu'); if (settings.brand !== '') { var brand = $('
'+settings.brand+'
'); $(menuBar).append(brand);