Zubir Zubir - 3 months ago 39
HTML Question

Native Page Transitions + phonegap + cordova

i am doing simple html and javascript with the native page transition..
i already add the plugin :cordova plugin add https://github.com/Telerik-Verified-Plugins/NativePageTransitions ..
i follow all the step inside the blog..but my transition page not working..this is my code..sorry i am still newbie..

my code :

<html>
<head>
<title>2PAGE</title>
<script type="text/javascript">
function slide(href) {
window.plugins.nativepagetransitions.slide({
"href" : "3page.html"
});
}
</script>
</head>
<body>
<button onclick="slide('right', '#3page')">Press Me</button>
</body>
</html>


Is this code correct ? please help me..i follow instruction from : http://www.telerik.com/blogs/native-performance-in-a-hybrid-app-with-native-page-transitions

Answer

As per the code file there isn't default cordova.js setup, i think because of it this plugin is not working for you.

it's working fine with mine demo project.

So please add

 <script src="cordova.js"></script>

and let me know if it is working or not.