1
votes

I'm attempting to use the new JQM panels ( http://jquerymobile.com/test/docs/panels/index.html ) as follows.

I'm creating a listview with charity names from a mysql query. I want to click on the charity name to open up a panel which will have more info (from the same query) on the charity. The JQM documentation states:

When you dynamically add content to a panel or make hidden content visible while the panel is open, you have to trigger the updatelayout event on the panel. $( "#mypanel" ).trigger( "updatelayout" );

However I don't know how I would use this - where would it go?

1

1 Answers

0
votes

You'd need to provide some code for a more specific answer, but basically each item in your list will call some function when clicked. That function will write the charity's info into the panel and then trigger the updatelayout. Like this:

function showCharityInfo() {
var charityInfo = "All about this charity....";
$('#mypanel').html(charityInfo);
$('#mypanel').trigger('updatelayout');
}