1. Download our Official Android App: Forums for Android!

Apps jquery modal not getting displayed in android emulator

Discussion in 'Android Development' started by ygardas, Jan 12, 2012.

  1. ygardas

    ygardas Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    2
    Joined:
    Jan 10, 2012

    Jan 10, 2012
    2
    0
    25
    I have a html page which shows modal in the web browser. I'm integrating that html in Android app using WebView. In emulator the modal is not getting displayed.
    Please let me know if I'm doing anything wrong here or if any config is needed?
    The below are the code snippets:


    <div style="width: 1300px; left: 0px;" class="belt" id=purchase-modal >
    <ul>

    </ul>
    </div>

    <div id="purchase-modal-content">
    <article id="innerMainbox" >

    </article>

    </div>

    function entitlementResponse(status, response) {
    if (response.status) {
    var res = response.message.length;
    tempEntitlementResp = response.message;
    $("#purchase-modal ul").empty();
    for ( var i = 0; i < response.message.length; i++) {
    var assetData = response.message;
    var myStringAr = [];
    myStringAr.push('<li class="panel" style="float: none; position:absolute; left:');
    myStringAr.push(i*120);
    myStringAr.push('px;"><a class="purchase newIn" href="javascript:;" onClick="launchVideo('+ i + ')" >');
    myStringAr.push('<img class="ImgSize" src="');
    myStringAr.push(assetData.image_url);
    myStringAr.push(' "</a><br></li>');
    $("#purchase-modal ul").append(myStringAr.join(""));
    }

    }
    }


    jQuery(function ($) {
    // Load dialog on page load
    //$('#basic-modal-content').modal();
    // Load dialog on click
    $('#purchase-modal .purchase').click(function (e) {

    $('#purchase-modal-content').modal();
    setTimeout( function() {
    $("#gallerya li").mouseover(function() {
    $("div",$(this)).show();
    $("img",$(this)).css("background", "#000");
    }).mouseout(function(){
    $("div",$(this)).hide();
    $("img",$(this)).css("background", "");
    }).each(function() { $("div",$(this)).hide()});
    } , 200);

    return false;
    });
    });
     

    Advertisement

Share This Page

Loading...