4
rated 0 times
[
5]
[
1]
/ answers: 1 / hits: 19017
/ 9 Years ago, wed, september 9, 2015, 12:00:00
I am creating a page for the transition.
Clicking on the page to navigate to another page - works on Firefox, but it doesn't on Chrome.
Error is showing :
Uncaught SecurityError: Failed to execute 'replaceState' on 'History':
A history state object with URL 'file:///C:/Users/athite/Desktop/DEMO/page.html' cannot be created in a document with origin 'null'.**
Here is my code:
<!DOCTYPE html>
<html>
<head>
<meta name=viewport content=width=device-width, initial-scale=1>
<link rel=stylesheet href=http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css>
<script src=http://code.jquery.com/jquery-1.11.3.min.js></script>
<script src=http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js></script>
</head>
<body>
<div data-role=page id=pageone>
<div data-role=header>
<h1>Welcome To My Homepage</h1>
</div>
<div data-role=main class=ui-content>
<p>Click on the link to see the slide effect.</p>
<a href=#pagetwo data-transition=slide>Slide to Page Two</a>
</div>
<div data-role=footer>
<h1>Footer Text</h1>
</div>
</div>
<div data-role=page id=pagetwo>
<div data-role=header>
<h1>Welcome To My Homepage</h1>
</div>
<div data-role=main class=ui-content>
<p>Click on the link to go back. </p>
<a href=#pageone data-transition=slide data-direction=reverse>Go to Page One</a>
</div>
<div data-role=footer>
<h1>Footer Text</h1>
</div>
</div>
</body>
</html>
More From » jquery