diff --git a/README.md b/README.md
index fc41fea..14b982b 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,7 @@ $dropdown.refresh();
## Data Attributes
-The `data-prefix` and `data-suffix` attributes can be added to the `` elements to insert custom HTML before and after each menu item, respectively. You can make use of these attributes to add icons, thumbnails, badges, etc. to the menu items. A good example can be seen [in the demo](https://thdoan.github.io/pretty-dropdowns/demo.html#example3).
+The `data-prefix` and `data-suffix` attributes can be added to the ` ` and ` ` elements to insert custom HTML before and after each menu item or menu group label, respectively. You can make use of these attributes to add icons, thumbnails, badges, etc. to the menu items. A good example can be seen [in the demo](https://thdoan.github.io/pretty-dropdowns/demo.html#example3).
## Keyboard Navigation
diff --git a/bower.json b/bower.json
index 8d896c6..e123ee1 100644
--- a/bower.json
+++ b/bower.json
@@ -1,7 +1,7 @@
{
"name": "pretty-dropdowns",
"description": "A simple, lightweight jQuery plugin to create stylized drop-down menus.",
- "version": "4.11.0",
+ "version": "4.12.0",
"main": [
"dist/css/prettydropdowns.css",
"dist/js/jquery.prettydropdowns.js"
@@ -22,9 +22,9 @@
"select"
],
"authors": [
- "T. H. Doan (http://www.tohodo.com/)"
+ "T. H. Doan (http://www.tohodo.com)"
],
- "homepage": "http://thdoan.github.io/pretty-dropdowns/",
+ "homepage": "https://thdoan.github.io/pretty-dropdowns/",
"repository": {
"type": "git",
"url": "git://github.com/thdoan/pretty-dropdowns.git"
diff --git a/dist/js/jquery.prettydropdowns.js b/dist/js/jquery.prettydropdowns.js
index 2a41b7a..1646773 100644
--- a/dist/js/jquery.prettydropdowns.js
+++ b/dist/js/jquery.prettydropdowns.js
@@ -1,9 +1,8 @@
/*!
- * jQuery Pretty Dropdowns Plugin v4.11.0 by T. H. Doan (http://thdoan.github.io/pretty-dropdowns/)
+ * jQuery Pretty Dropdowns Plugin v4.12.0 by T. H. Doan (https://thdoan.github.io/pretty-dropdowns/)
*
* jQuery Pretty Dropdowns by T. H. Doan is licensed under the MIT License.
- * Read a copy of the license in the LICENSE file or at
- * http://choosealicense.com/licenses/mit
+ * Read a copy of the license in the LICENSE file or at https://choosealicense.com/licenses/mit/
*/
(function($) {
@@ -377,7 +376,7 @@
break;
case 'OPTGROUP':
sClass += ' label';
- sText = elOpt.getAttribute('label');
+ sText = (elOpt.getAttribute('data-prefix') || '') + elOpt.getAttribute('label') + (elOpt.getAttribute('data-suffix') || '');
break;
}
if (elOpt.disabled || (sGroup && elOpt.parentNode.disabled)) sClass += ' disabled';
diff --git a/package.json b/package.json
index 5a05232..ddc3d3d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pretty-dropdowns",
- "version": "4.11.0",
+ "version": "4.12.0",
"description": "A simple, lightweight jQuery plugin to create stylized drop-down menus.",
"keywords": [
"jquery-plugin",
@@ -10,12 +10,12 @@
"drop-down menu",
"select"
],
- "homepage": "http://thdoan.github.io/pretty-dropdowns/",
+ "homepage": "https://thdoan.github.io/pretty-dropdowns/",
"bugs": {
"url": "https://github.com/thdoan/pretty-dropdowns/issues"
},
"license": "MIT",
- "author": "T. H. Doan (http://www.tohodo.com/)",
+ "author": "T. H. Doan (http://www.tohodo.com)",
"main": "dist/js/jquery.prettydropdowns.js",
"dependencies": {
"jquery": ">=1.7.0"