I'm trying to use this script to set a button on my application(html+css+js+jquery) that does the same as the default button of the android device.
This is the script:
</script>
<script type="text/javascript">
$(document).ready(function(){
$('a.back').click(function(){
if(document.referrer.indexOf(window.location.hostname) != -1){
parent.history.back();
return false;
}
});
});
</script>
Then i have something like this in my code that uses the scrip:
<a class="back">
<img src="back.png" id="back" style="width: 75%;"></a></div>
This works well in the internet browsers but when compiling with PhoneGap does not work on android device...