JQM dialog is opening in new page instead of dialog

Posted by K D on Stack Overflow See other posts from Stack Overflow or by K D
Published on 2013-06-29T22:18:51Z Indexed on 2013/06/29 22:21 UTC
Read the original article Hit count: 159

Filed under:
|
|
|

Thank you for taking the time to read my question. I'm trying to get a dialog box to open using Jquery mobile. I followed the documentation and used the data-rel="dialog" notation along with the data-transition="pop". Instead of a dialog appearing on the same page, I get a brand new page with the dialog appearing. Can someone kindly assist me on how to fix this functionality.

Here is my code for the initial main page:

<article>
                <ul data-role="listview" data-split-icon="star" data-split-theme="d" data-inset="true">
                    <li><a href="#black_seed_desc" data-rel="dialog"  ><img src="black_seed.jpg"/>
                        <h3>Black Seed Oil</h3>
                        </a>
                        <a href="#black_seed_purchase" data-rel="dialog" data-transition="pop">Purchase Black Seed Oil</a>
                    </li>
                </ul>
            </article>

Here is my code for the dialog page:

<div data-role="dialog" id="black_seed_purchase" data-theme="c">
    <section data-role="content">
        <h1>Purchase Black Seed Oil?</h1>
        <p>By purchasing Black Seed Oil you will receive
        an email receipt copy sent to you for your reference.</p>
        <a href="#purchase_blackseed" data-inline="true" data-corners="true" data-rel="back" data-role="button" data-shadow="true" data-iconshadow="true"
        data-wrapperrels="span">
        <span>
            <span>Buy: $49.99</span>
            <span>&nbsp;</span>
        </span>
        </a>
        <a href="#" data-role="button" data-rel="back" data-inline="true"       data-corners="true"
        data-wrapperrels="span" data-shadow="true" data-iconshawdow="true">
        <span>
            Cancel
        </span>
        </a>
    </section>
</div>

Here is a working example. http://jsfiddle.net/Gajotres/w3ptm/?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html5