Response title
This is preview!
var url = oLoginmgr.baseurl+"/admin/cor/admin_login";
console.log(url);
//$.mobile.changePage(url);
$("body").pagecontainer('change',url);
$(document).on('pagecreate',"#br_smsDetails",function(){
// this event works as exkpected.
$(this).on('pagehide',function(){
console.log('this page hide');
omenu.runCode('textmessage');
});
//this event fires for both the parent page as well as the new page
// I had to add the if condition to only fire on the new page
$(":mobile-pagecontainer").on('pagecontainerhide',function(e, ui){
if (ui.prevPage[0].id == 'br_smsDetails') {
console.log(':mobile page hide');
}
});
// this does not work
$("body").on('pagecontainerhide',"#br_smsDetails",function(){
console.log(':mobile page hide with id');
});
// this does not work
$("#br_smsDetails").on('pagecontainerhide',function(){
console.log('page name hide');
});
})
<form id="frm_cccheckou" action="/signup/processCC" method="post" enctype="multipart/form-data">
<input type="hidden" id="clienttoken" value="<?php echo $this->getClientToken() ?>" />
<label for="cardholder_name">Name On Card:</label>
<input type="text" id="cardholder_name" required data-braintree-name="cardholder_name" value="" />
<label for="number">Creadit Card Number:</label>
<input type="text" id="number" required data-braintree-name="number" value="" />
<label>Expireation Month / Year:</label>
<table style="width:150px">
<tr>
<td>
<input type="text" id="expiration_month" class="required" data-braintree-name="expiration_month" maxlength="2" value="" />
</td>
<td style="width:5px">/</td>
<td>
<input type="text" id="expiration_year" class="required" data-braintree-name="expiration_year" maxlength="2" value=""/>
</td>
</tr>
</table>
<div style="display: inline">
<label style="width:100px;">Security Code:</label>
<div style="width:80px;">
<input type="text" id="cvv" class="required" data-braintree-name="cvv" maxlength="4" value=""/>
</div>
</div>
<label for="agreeterms">I agree to the terms and conditions.</label>
<input type="checkbox" class="required" id="agreeterms" class="required" name="agreeterms" value="1" />
<a class="ui-btn">View Terms and Conditions</a>
<input type="button" class="btn_submit_payment" value="Submit Payment" />
</form>
var $wrp = $("#frm_cccheckout");
var validate = $wrp.validate();
var isvalid = validate.form();
if(isvalid) {...}
<form id="frm_saveaffiliate" action="/admin/affiliate_setup/savesharefees" method="post">
© 2013 jQuery Foundation
Sponsored by and others.