I got a short external script code I want to show on Button click, (onload hidden) using jquery or JS. the button works on simple div or iframe. the weird is it works well on the browser (with emulator), I can't get this to work on the the device itself :-/ (fixed question)
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
// Now safe to use device APIs
$("#showBitcoin").click(function(){
$("#coindesk-widget").show();
});
$("#showRates").click(function(){
$("#iframe").show();
});
};
</script>
<button id="showRates">Live Exchange rates</button>
<button id="showBitcoin">Bitcoin rate</button>
<div id="coindesk-widget"></div>
<script type="text/javascript" src="js/coindesk-widget.min.js"></script>
css:
#iframe{
display:none;
}
#coindesk-widget{
display:none;
}
comment: The button shows the iframe, can't get the script to show at all it's a live bitcoin widget graph (CoinDesk). Thanks
There has been a fix for my question, refering to the original id named "coindesk-widget"
$("#showBitcoin").click(function(){
$("coindesk-widget").show();
This fixed the function it works well. under PhoneGap desktop tool. but still can't get this to work on samsung device