Skip to content

Commit bdecdd4

Browse files
committed
Add support for data-attributes
1 parent 15182a5 commit bdecdd4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jquery.selectBox.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ if(jQuery) (function($) {
277277
var li = $('<li />'),
278278
a = $('<a />');
279279
li.addClass( $(this).attr('class') );
280+
li.data( $(this).data() );
280281
a.attr('rel', $(this).val()).text( $(this).text() );
281282
li.append(a);
282283
if( $(this).attr('disabled') ) li.addClass('selectBox-disabled');
@@ -291,6 +292,7 @@ if(jQuery) (function($) {
291292
var li = $('<li />'),
292293
a = $('<a />');
293294
li.addClass( $(this).attr('class') );
295+
li.data( $(this).data() );
294296
a.attr('rel', $(this).val()).text( $(this).text() );
295297
li.append(a);
296298
if( $(this).attr('disabled') ) li.addClass('selectBox-disabled');
@@ -336,6 +338,7 @@ if(jQuery) (function($) {
336338
var li = $('<li />'),
337339
a = $('<a />');
338340
li.addClass( $(this).attr('class') );
341+
li.data( $(this).data() );
339342
a.attr('rel', $(this).val()).text( $(this).text() );
340343
li.append(a);
341344
if( $(this).attr('disabled') ) li.addClass('selectBox-disabled');
@@ -352,6 +355,7 @@ if(jQuery) (function($) {
352355
var li = $('<li />'),
353356
a = $('<a />');
354357
li.addClass( $(this).attr('class') );
358+
li.data( $(this).data() );
355359
a.attr('rel', $(this).val()).text( $(this).text() );
356360
li.append(a);
357361
if( $(this).attr('disabled') ) li.addClass('selectBox-disabled');

0 commit comments

Comments
 (0)