Hi guys, I am developing a phonegap application. I am not new to programming but I am fairly new to javascript.
I don't know why but jQuery mobile seems to not be working correctly in my app. I am using Dreamweaver but I guess that doesn't matter.
I define a button in HTML like this:
- <body onload="init();">
- (...)
- <div id="header" data-role="header" data-theme="b" data-position="inline">
<a class="ui-btn-right" id="save" data-icon="check" data-theme="b">Save</a>
</div>
And then I try to code some javascript actions into it.
- function deviceReady() {
}
function init() {
document.addEventListener("deviceready", deviceReady, true);
}
$(document).ready(function() {
$("#save").click(function test() {
$("#pname").textinput("disable");
});
});
Whatever I do or try nothing happens. #pname is a jquery text input field, and it's not disabled and I can insert text even if I clicked on the button. I want this button to perform some actions but it can't even perform this simple step so obviously something is wrong. Any idea what?