I have just started getting a very strange error when using jQueryMobile for my mobile website/app
edit i am adding a picture, probably a lot easier to understand the question
edit2 i have found the issue. still curious as to why this is the way it is
if you wish to see the original post please read the edits
So in my master.js file I had the following code
Object.prototype.hasAttr = function(attr) {
var _attr;
if(this.attr) {
_attr = this.attr(attr);
} else {
_attr = this.getAttribute(attr);
}
return (typeof _attr !== "undefined" && _attr !== false && _attr !== null);
};
If I remove the code everything works! I have also run the code through jsLint and it does not contain errors.
I’ve looked in the docs and the jQueryMobile framework does not have a function called hasAttr so where is the conflict?
PLEASE NOTE: THIS FUNCTION IS NEVER ACTUALLY RUN! JUST INCLUDING IT BREAKS THINGS

conflicting code was the issue.