diff --git a/lib/jquery.easyPaginate.js b/lib/jquery.easyPaginate.js index 9f959de..a6ad691 100644 --- a/lib/jquery.easyPaginate.js +++ b/lib/jquery.easyPaginate.js @@ -36,7 +36,9 @@ $.fn.easyPaginate = function (options) { prevButton: true, prevButtonText: '<', nextButton: true, - nextButtonText: '>' + nextButtonText: '>', + navElement: 'div', // 'ul' for ul > li > a, 'div' for div > a + navElementClass: '', } return this.each (function (instance) { @@ -56,29 +58,70 @@ $.fn.easyPaginate = function (options) { }; var displayNav = function() { - htmlNav = '
'; - - if(plugin.settings.firstButton) { + var navElementClass = plugin.settings.navElementClass === '' + ? 'easyPaginateNav' + : 'easyPaginateNav ' + plugin.settings.navElementClass; + if (plugin.settings.navElement === 'ul') { + htmlNav = ''; + } else { + htmlNav += '
'; } - - htmlNav += ''; plugin.nav = $(htmlNav); plugin.nav.css({ 'width': plugin.el.width()