Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

help with jquery js error

getting this error Uncaught TypeError: Cannot call method 'not' of undefined
When navigating to a screen.
Tried renaming screen, custom js to load screen and apperys navigate.

All other screen s load fine.

Error refers to
hierarchyClass = $cells.not( this ).filter( "thead th" ).length && " ui-table-cell-label-top",
within jq mobile 1.3.0 line 8622
code

$.mobile.document.delegate( ":jqmData(role='table')", "tablecreate", function() {

var $table = $( this ),
self = $table.data( "mobile-table" ),
o = self.options;

// If it's not reflow mode, return here.
if( o.mode !== "reflow" ){
return;
}

self.element.addClass( o.classes.reflowTable );

// get headers in reverse order so that top-level headers are appended last
var reverseHeaders = $( self.allHeaders.get().reverse() );

// create the hide/show toggles
reverseHeaders.each(function(i){
var $cells = $( this ).jqmData( "cells" ),
colstart = $( this ).jqmData( "colstart" ),
hierarchyClass = $cells.not( this ).filter( "thead th" ).length && " ui-table-cell-label-top",
Uncaught TypeError: Cannot call method 'not' of undefined
text = $(this).text();

Code: Select all

if( text !== ""  ){ 

 if( hierarchyClass ){ 
  var iteration = parseInt( $( this ).attr( "colspan" ), 10 ), 
   filter = "&quot 

  if( iteration ){ 
   filter = "td:nth-child("+ iteration +"n + " + ( colstart ) +")&quot 
  } 
  $cells&#46;filter( filter )&#46;prepend( "<b class='" + o&#46;classes&#46;cellLabels + hierarchyClass + "'>" + text + "<&#47;b>"  ); 
 } 
 else { 
  $cells&#46;prepend( "<b class='" + o&#46;classes&#46;cellLabels + "'>" + text + "<&#47;b>"  ); 
 } 

} 

});

});
/code

Any ideas?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

help with jquery js error

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

help with jquery js error

Was using htm code in panel to make editing and deleting of local storage items by user tapping header to delete and value to edit.
code
<table data-role="table" class="blockgrid" id="myTable" name="myTable" data-mode="reflow">
<tbody>
<tr>
<th>Touch KEY To Delete<&#47;th>
<&#47;tr>
<tr>
<td><strong>Touch VALUE To Edit<&#47;strong><&#47;td>
<&#47;tr>
<&#47;tbody>
<&#47;table>
/code
Used to be ok but with jquery mobile 1.3 this fails with said error.

So I used the Awesome newly implemented WYSIWYG editor to generate the table instead... And problem solved!!

Return to “Issues”