Ok I figured out the problem, but I think this is a bug in JQM. The issue is that I have an empty select. The reason it is empty is because it is filled with ajax.
So if I put in an empty <option></option> then it works without errors.
So can someone tell me if this is the intended behavior or if this is a bug?