0

After coming from PHP background, I am just trying to get to grips with jquerymobile.

I have created a web app and what I need is a jquery popup with a message on the index page on first load only. I am stuck on

a) How to create the popup to load after page has loaded without intervention

b) Make sure popup only displays on first visit.

Thanks in advance

uknutz
  • 1

1 Answers1

0

Use the pageinit event, bind a handler function and within it show the dialog with

$.mobile.changePage(url, {role: dialog});

How you bind the listener for the pageinit event will depend how whether you use IDs etc, one solution is in my answer here: https://stackoverflow.com/a/9085014/737023

Community
  • 1
  • 1
Clarence Liu
  • 3,874
  • 2
  • 25
  • 29