Convert dialog and button over to using vclick.

This commit is contained in:
Kin Blas 2011-03-08 08:52:17 -08:00
parent dded1be380
commit 79c1b1fb69
2 changed files with 3 additions and 3 deletions

View file

@ -33,9 +33,9 @@ $.widget( "mobile.dialog", $.mobile.widget, {
- if the click was on the close button, or the link has a data-rel="back" it'll go back in history naturally
*/
this.element
.bind( "click submit", function(e){
.bind( "vclick submit", function(e){
var $targetel;
if( e.type == "click" ){
if( e.type == "vclick" ){
$targetel = $(e.target).closest("a");
}
else{

View file

@ -37,7 +37,7 @@ $.widget( "mobile.button", $.mobile.widget, {
//add hidden input during submit
var type = $el.attr('type');
if( type !== 'button' && type !== 'reset' ){
$el.click(function(){
$el.bind("vclick", function(){
var $buttonPlaceholder = $("<input>",
{type: "hidden", name: $el.attr("name"), value: $el.attr("value")})
.insertBefore($el);