8000 prevent jqmData calls for columns without a priority by staabm · Pull Request #7315 · jquery-archive/jquery-mobile · GitHub
Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

prevent jqmData calls for columns without a priority #7315

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions js/widgets/table.columntoggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ $.widget( "mobile.table", $.mobile.table, {

// create the hide/show toggles
this.headers.not( "td" ).each( function() {
var header = $( this ),
priority = $.mobile.getAttribute( this, "priority" ),
cells = header.add( header.jqmData( "cells" ) );
var cells,
header = $( this ),
priority = $.mobile.getAttribute( this, "priority" );

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

( keep ? inputs.eq( checkboxIndex++ ) :
Expand Down