Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQueryMobile 'not' error

I'm trying to append the MainDisplay Variable to id div element called searchoutputtable

<div id="searchoutputtable">
</div>

Here is the code I use to do this:

    $.getJSON(AddressAccess+Build,
    function(data)
    {
     //Do a lot of manipulations to MainDisplay Variable
$('#searchoutputtable').append(MainDisplay);
    window.location.href = "#resultssearch";
    });

Now everytime this happends I get the following error in my javascript console:

Uncaught TypeError: Cannot call method 'not' of undefined 

Now when I console.log the element searchoutputtable I get what I am looking to do it appends everything perfectly the only problem is when we exit the getJson function that I get that error and my element isn't displayed at all.

Note I'm using jQueryMobile, yes I load the libraries correctly and I'm not using the .not() in jQuery at all so I'm not understanding what 'not' they are referring to in the error above

like image 322
user481610 Avatar asked Apr 24 '26 23:04

user481610


1 Answers

When using the reflow table widget you have to definitely make sure that you use the <thead> and <tbody> tags when working with tables. Thus in the above example my MainDisplay variable had a standard table in it without the thead and tbody tags and hence the error.

like image 117
user481610 Avatar answered Apr 26 '26 12:04

user481610



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!