I am new on JQuery Mobile and I am trying to display a page with a JqPlot graphic depending on the user choice.
I read and experimented this morning that by design the j
JQuery .load()
is a good option for loading pages including having the Javascript executed and CSS applied as per a standard page load. I used this technique with partial pages in an MVC single-page website and found it to be very effective.
I wasn't entirely clear on your concerns around the links, but certainly using JQuery .load() within a 'click' handler for links will also work.
Your code looks sound, and it's good to see that you are applying a loading layer while the async load happens. I'm not sure 100% sure how that layer works for you, but I'm thinking you probably need to hide/remove it once the .load()
has completed, so perhaps there needs to be some extra code in your post-load handler to do so?