or
var
productviewed =
function
(view) {
alert(
"viewed"
);
};
$(document).ready(
function
() {
$(
"#autoloan"
).bind(
"show"
, productviewed);
});
<div data-role="view" id="autoloan" data-title="Auto Loan" data-transition="slide" data-layout="message" >
...
</div>
I'm trying to hook to the show event of the view by doing the above. However the alert dialog seems to never get called.
Have I done something incorrectly?
schema: {
model: {
id: "ID",
fields: {
Email: { validation: { required: true}},
datauid: { editable: false}
}
},
total: function(result) {
// Count records
//alert(result.length);
GridCount_dataBound(result);
}
}
columns: [
{ field: "Email", title: "<?
php
echo $this->translate("Email"); ?>"},
{ field: "datauid", title: "<?
php
echo $this->translate("UID"); ?>", template: "<
input
type
=
'hidden'
name
=
'datauid'
value
=
'#= uid #'
>"},
{ command: [
{name: "edit"},
{name: "destroy"}
], width: "200px"
}
],
models [{"ID":"","Email":"cyxcyxcxy","datauid":""}]