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

jquery modal not getting displayed in android emulator

Discussion in 'Introductions' started by ygardas, Jan 10, 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

  2. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    37,137
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    37,137
    35,736
    4,238
    Male
    IT
    Pennsylvania
    Hello and welcome to Android Forums, ygardas! :)

    I don't think you are going to find anyone qualified to help you with coding in the introduction forum. You might want to revisit the question with our developer members in Application Development - Android Forums
     
  3. Rush

    Rush {<>}~{<>}
    Rank:
    None
    Points:
    1,143
    Posts:
    18,742
    Joined:
    Jan 31, 2011

    Jan 31, 2011
    18,742
    3,171
    1,143
    Male
    Entrepreneur / Business Owner - Freelance Writer
    Loganville, GA
    Hello and welcome... I wish I could understand those technical details but, unfortunately.. I just can't.. However, I see that you were redirected over to some of our more experience members, who might can assist you better. Thanks for joining the community! ;)
     
  4. D-U-R-X

    D-U-R-X turbo drinker
    Rank:
    None
    Points:
    1,343
    Posts:
    16,881
    Joined:
    Apr 20, 2011

    Apr 20, 2011
    16,881
    7,193
    1,343
    Work to live, not the other way round!!
    Sheffield, South Yorkshire
    Welcome to the forums - nice to see another dev joining us!!
     

Share This Page

Loading...