jquery Mobile implements a simple example of the effect of a custom Confirm validation box _jquery

Source: Internet
Author: User

Similar to the effect of deletion, before the implementation of the general need to add Confirmation dialog box, click to confirm the execution of the cancellation button will not execute, the traditional JS

if (confirm) (' OK delete? '))

{

//execute code

}

This is an ugly effect, using jquery mobile to optimize

Files to refer to:

<script src= "~/scripts/jquery-1.10.2.min.js" ></script>
<link href= "~/scripts/mobile/jquery.mobile-1.4.0.min.css" rel= "stylesheet"/>
<script src= "~/scripts/mobile/jquery.mobile-1.4.0.min.js" ></script>

The effect is as follows:

function UpdateStatus () {var popupdialogid = ' Popupdialog '; $ (' <div data-role= "popup" id= "' + Popupdialogid + '" data-confirmed= "no" data-transition= "Pop" data-overlay-theme= "b "Data-theme=" B "data-dismissible=" false "style=" min-width:216px;max-width:500px; > \ <div role= "main" class= "Ui-content" >\ 

The above is a small series for everyone to bring the jquery mobile implementation of the custom Confirm confirmation box effect of a simple example of all the content, I hope that we support the cloud-Habitat Community ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.