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?:
Here's my list html (one list item):HTML Code:<a href="#imgshow" data-transition="pop" data-rel="dialog"> <img src="../images/1DV.jpg" alt="imgname.jpg"/> </a>
And here's my jQuery that calls the dialog: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>
Thankful for suggestions on how to solve this!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'); });



Reply With Quote
Bookmarks