Mobile: creating a simple ajax pattern for mobile pages

This is a really interesting and simple way to handle ajax request using a sort of “controller” sitting in between your page and the different pages that get served in your mobile app (see real example at:

1) A page with an empty container is served. The empty container is loaded via load(), based on the page that we are fetching from the server, plus an identifier #content so we only serve part of the response

2) The page to serve is parsed off the href

3) Load also gets a callback anonymous function, that reattach link click events to the HTML

4) Note the use of text-overflow: ellipsis; to avoid long titles distorting the UI

Leave a Reply

Your email address will not be published. Required fields are marked *