I am making transitions using this page: http://jquerymobile.com/demos/1.2.0/docs/pages/page-transitions.html
I make the transition when I click on the link:
<a href="#page1" data-transition="slide" data-role="button" > Submit </a>
This makes the slide transition.
If I need to change the data transition attribute in data-transition = "none", I will not get any transition.
Now I want to do some logic before making the transition. In other words, it would be nice if I could perform the same transition with javascript. This is what I have right now:
function GoTopage1()
{
if(someVar == true)
window.location = "#page1";
}
and my link is now similar:
<a onclick="GoTopage1()" data-transition="slide" data-role="button" > Submit </a>
This code works, but I lost the slide transition. When you click on the link, I get a default transition that goes into transition. How can I make the transition with the code?
Edit
, , :
:
<a id="t1" href="#page1" data-transition="slide" ></a>
:
function GoTopage1()
{
if(someVar == true)
$("#t1").click();
}