Skip to content

Commit ded2f7f

Browse files
staabmarschmitz
authored andcommitted
Table: prevent jqmData calls for columns without a priority.
Closes jquery-archivegh-7315 Fixes jquery-archivegh-7357
1 parent 8ec5c0b commit ded2f7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/widgets/table.columntoggle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ $.widget( "mobile.table", $.mobile.table, {
8383

8484
// create the hide/show toggles
8585
this.headers.not( "td" ).each( function() {
86-
var input,
86+
var input, cells,
8787
header = $( this ),
88-
priority = $.mobile.getAttribute( this, "priority" ),
89-
cells = header.add( header.jqmData( "cells" ) );
88+
priority = $.mobile.getAttribute( this, "priority" );
9089

9190
if ( priority ) {
91+
cells = header.add( header.jqmData( "cells" ) );
9292
cells.addClass( opts.classes.priorityPrefix + priority );
9393

9494
// Make sure the (new?) checkbox is associated with its header via .jqmData() and

0 commit comments

Comments
 (0)