I have an Index.Html and UI/Main.html files. Index html PageInit event I want to locate the page to main.html. Here is the javascript below.
$(document).bind("pageinit", function () {
debugger;
if (localStorage.getItem("user") != null) {
$.mobile.changePage("UI/Main.html", {
transition: "slideup",
reverse: false,
changeHash: false
});
}
});
This script redirects the page , but when I look into chrome console it gives me 404 error
../Site/UI/UI/Main.html but I want it to redirect ../Site/UI/Main.html
Why it add double UI? Any Ideas
Also in the Index.html a href
element working good.
<a href="UI/Main.html" id="myhref" data-theme="reset" data-ajax="false" class="mobilizmred" data-role="button" data-ajax="false">Sign in</a>