HTML and CSS Reference
In-Depth Information
el.addEventListener("click", function pushCard(event){
var pageid = this.href.hash;
goToCard(pageid);
event.preventDefault();
});
});
function goToCard(to){
document.querySelectorAll('.card.active')[0].classList.remove('active');
document.querySelectorAll(to)[0].classList.add('active');
}
</script>
</body>
</html>
As you can see, there are several useful methods for paging for mobile.
Although the examples are presented as separate, you can combine them. For
instance, you can combine the container and Ajax methods to separate the
different sections and functionality of your application. You can also use Ajax to
load content and data dynamically using JSON/XML with any of the methods
mentioned within this chapter to generate new dynamic views.
The next section will take you through the first stages of creating the MoMemo
application.
Creating the App
The key to creating a usable mobile web application is in the planning. Deciding
what key functionality your mobile web application has, and how users will get
to the important features and data, will help you to decide how to implement the
application itself, using paging techniques, design, and UI. If you do not like
planning, this can be a laborious and boring task, but it will help you iron out
problems before you start development and design.
Planning MoMemo
The first step in this process is to define the application in a single sentence.
When defining an application in a single sentence, you should try to avoid
 
Search WWH ::




Custom Search