Jumat, 06 Juni 2014

Jquery Mobile Popup Window Snippet

This is code snippet for jquery mobile popup window

<a href="#popupDialog{{ $acc->ID }}" 
    data-rel="popup" 
    data-position-to="window" 
    data-inline="true" 
    data-transition="pop" 
    data-theme="b">Delete</a>


<!-- dialog -->
<div data-role="popup" 
    id="popupDialog{{ $acc->ID }}" 
    data-overlay-theme="a" 
    data-theme="a" 
    data-dismissible="false" 
    style="max-width:400px;">
        <div data-role="header" data-theme="a">
        <h1>Confirm</h1>
    </div>
    <div data-role="content" data-theme="d">
        <p>This action cannot be undone.</p>
        <p>Are you sure want to delete {{ $acc->ID }}?</p>
        <a href="#" data-role="button" 
            data-inline="true" data-rel="back" data-theme="c">
            Cancel
        </a>
        <a href="#" data-role="button" 
            data-inline="true" 
            data-rel="back" data-transition="flow" 
            data-theme="b" id="yesConfirm" 
            onclick="alert('test {{ $acc->ID }}');">
            Yes
        </a>
    </div>
</div>
<!-- dialog -->