The way JQM works is it transforms elements already in the DOM. Hence, its ajax loading nature. It loves statically typed pages. Since you are doing a dynamic button, (and trust me I am too) the best way is using Firebug to get all the stylings needed for a button you typed statically on a page, and adding them around your dynamic button, and setting data-rel="none" to the original button element.
Thanks everyone. I fixed it by inserting the button text into a <span> and giving the span an id. Then I was able to use the above code but changing the span innerHtml instead of the button.
i have this issue but canot solve it doing what is described here, anyone expand upon why innerhtml doesnt work ?
thanks..the link is http://cambs.eu/mobile00/ swip left to get page 2 where the facebook login is. its the login button im trying to get to change to logout....