gaurav gaurav - 1 year ago 61
Javascript Question

jquerymobile back button is not showing on header

I am trying to make a

mobile site in MVC
, i am new to jquerymobile, i copied the following code from JQM tutorial and paste it in a
in MVC

<div data-role="page" id="home">

<div data-role="header">

<div data-role="content">
<p><a href="#about" data-role="button">About this app</a></p>


<div data-role="page" id="about">

<div data-role="header">
<h1>About This App</h1>

<div data-role="content">
<p>This app rocks! <a href="#home" data-role="button">Go home</a></p>


My problem is, that it shows the
back button on header in the demo
from where i copied the code but when i run this in ,
the back button is not there
can any body tell me, why this happened?

Answer Source

Try putting the following attibute on your "page" div:



<div data-role="page" id="home" data-add-back-btn="true">