Results 1 to 2 of 2

Thread: dialog pop up from list item possible?

  1. #1
    Join Date
    Jan 2012
    Location
    Malmoe, Sweden
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default dialog pop up from list item possible?

    Is it possible to make a dialog pop up from a jQuery mobile list the same way it's possible from an object like this?:

    HTML Code:
    <a href="#imgshow" data-transition="pop" data-rel="dialog">
     <img src="../images/1DV.jpg" alt="imgname.jpg"/>
         </a>
    Here's my list html (one list item):
    HTML Code:
    <li class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c">
         <div class="ui-btn-inner ui-li">
     <div class="ui-btn-text">
         <a class="ui-link-inherit" href="#imgshow" data-transition="pop" data-rel="dialog">imgname.jpg
     <img src="../images/imgname.jpg" alt="imgname.jpg"/></a>
     </div>
         </div>
     </li>
    And here's my jQuery that calls the dialog:
    Code:
    $('.gallerycontent img').bind('tap',function(event, ui){
                        var src = $(this).attr("src");
                        var alt = $(this).attr("alt");
                        $('#dialogcontent').empty().append('<a href="#gallerypage"><img src="' + src + '" style="width:100%;"/></a>' );
                        $('#dialoghead').empty().append('<center><h2>' + alt + '</h2></center>' );
                        $(this).parent().addClass('selectedimg');
                    });
    Thankful for suggestions on how to solve this!

  2. #2
    Join Date
    Jan 2012
    Location
    Malmoe, Sweden
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Maybe this isn't the right forum for my problem... I got the answer in another forum if anyone's interested:

    http://forum.jquery.com/topic/pop-up...-item-possible

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •