performance - Javascript isn't firing in <script> but works in the phonegap function onBodyLoad(), why is this? -
earlier asked question showing or hiding div when radio button selected. solution provided here http://jsfiddle.net/mfjuv/1/
i'm using phonegap. when place javascript code hide div within onbodyload() function necessary phonegap, works.
however when not using phonegap , placing same code within code tag never fires , div never hidden. need include function fire once page has loaded?
$('#machinedropdown').hide() $('input').change( function(){ if ($(this).is(':checked') && $(this).attr('id') == 'radio-choice-h-6c') { $('#machinedropdown').show() } else { $('#machinedropdown').hide() } });
you need put code inside
$(document).ready(function(){ //... }); similar phonegap's onbodyload() event.
Comments
Post a Comment