0

There are a few questions about JQuery navigation with ajax, but I don't see answers I'm looking for, so here's my take.

I have a simple webpage using JQuery Mobile, which is using JQM's "navigation system", i.e. hashtag on one side, plus it recognizes that form was submitted and does ajaxization internally. In other words it is enough for me to put href="some_url" in A tag, or to make a simple form with submit button, and JQ Mobile does the rest.

Now I need to do exactly the same thing, but for a desktop version of the site. JQ Mobile-like navigation system would be ideal (but it is not usable for "normal" HTML ajax since it cleans HTML of all non-mobile-compatible tags) since then the server-side logic would remain the same, and I would only change the "layout" (mobile/desktop) to show different pages to the users on different devices.

Any idea on how to proceed?

Thank you,

Bozo

1
  • Update: maybe malsup.com/jquery/form is part of a solution. Commented Nov 7, 2011 at 7:36

1 Answer 1

1

I have been looking for a framework similar to jQuery Mobile for web AND mobile without any luck.

What we implemented instead:

To handle page navigation/hash change we used: http://benalman.com/projects/jquery-hashchange-plugin/. Use this to show/hide data-role="page"

Ajax form handling can you handle with jQuery submit()

To load HTML into your pages instead of following link, you can do this with jQuery load()

On top of this we provide different mobile and web views. This can be done by using media queries in the client, or by detecting device type server side.

Sign up to request clarification or add additional context in comments.

1 Comment

If it's not a problem, can you please copy paste one example of a .submit() and one example of a .load() in the context of what you described in your answer above? Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.