You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!doctypehtml><html><head><metacharset="UTF-8"/><title>jQTouch β</title><linkrel="stylesheet"href="../../themes/css/jqtouch.css"title="jQTouch"><scriptsrc="../../src/lib/zepto.min.js"type="text/javascript"charset="utf-8"></script><scriptsrc="../../src/jqtouch.min.js"type="text/javascript"charset="utf-8"></script><!--Uncommentthefollowingtwolines(andcommentouttheprevioustwo)tousejQueryinsteadofZepto.--><!--<scriptsrc="../../src/lib/jquery-1.7.min.js"type="application/x-javascript"charset="utf-8"></script> --><!--<scriptsrc="../../src/jqtouch-jquery.min.js"type="application/x-javascript"charset="utf-8"></script> --><scriptsrc="../../extensions/jqt.themeswitcher.min.js"type="application/x-javascript"charset="utf-8"></script><scripttype="text/javascript"charset="utf-8">
var jQT = new $.jQTouch({icon : 'jqtouch.png',icon4 : 'jqtouch4.png',addGlossToIcon : false,startupScreen : 'jqt_startup.png',statusBar : 'black-translucent',themeSelectionSelector : '#jqt #themes ul',preloadImages : []});
// Some sample Javascript functions:
$(function() {// Show a swipe event on swipe test$('#swipeme').swipe(function(evt,data){vardetails=!data ? '' : '<strong>'+data.direction+'/'+data.deltaX+':'+data.deltaY+'</strong>!';$(this).html('You swiped '+details);$(this).parent().after('<li>swiped!</li>')});$('#tapme').tap(function(){$(this).parent().after('<li>tapped!</li>')});$('a[target="_blank"]').bind('click',function(){if(confirm('This link opens in a new window.')){returntrue;}else{returnfalse;}});// Page animation callback events$('#pageevents').bind('pageAnimationStart',function(e,info){$(this).find('.info').append('Started animating '+info.direction+'… And the link '+'had this custom data: '+$(this).data('referrer').data('custom')+'<br>');}).bind('pageAnimationEnd',function(e,info){$(this).find('.info').append('Finished animating '+info.direction+'.<br><br>');});// Page animations end with AJAX callback event, example 1 (load remote HTML only first time)$('#callback').bind('pageAnimationEnd',function(e,info){// Make sure the data hasn't already been loaded (we'll set 'loaded' to true a couple lines further down)if(!$(this).data('loaded')){// Append a placeholder in case the remote HTML takes its sweet time making it back// Then, overwrite the "Loading" placeholder text with the remote HTML$(this).append($('<div>Loading</div>').load('ajax.html .info',function(){// Set the 'loaded' var to true so we know not to reload// the HTML next time the #callback div animation ends$(this).parent().data('loaded',true);}));}});// Orientation callback event$('#jqt').bind('turn',function(e,data){$('#orient').html('Orientation: '+data.orientation);});});
function toggleCheckbox() {if($('#myCheckbox1').attr('checked')=='true'){$('#myCheckbox1').removeAttr("checked");} else {$('#myCheckbox1').attr('checked',true);}
window.setTimeout('toggleCheckbox()', 2000); //toggle every 2 seconds
}toggleCheckbox();</script><styletype="text/css"media="screen">
#jqt.fullscreen #home .info {display: none;}
div#jqt #about {padding: 100px10px40px;text-shadow: rgba(0,0,0,0.3)0px-1px0;color: #999;font-size: 13px;text-align: center;background: #161618;}
div#jqt #about p {margin-bottom: 8px;}
div#jqt #about a {color: #fff;font-weight: bold;text-decoration: none;}</style></head><body><divid="jqt"><divid="home"class="current"><divclass="scroll"><ulclass="rounded"><li>MyCheckbox<spanclass="toggle"><inputtype="checkbox"id="myCheckbox1"></span></li></ul></div></div></div></body></html>
Every 2 seconds the checkbox change its value itself.
If the user click on the checkbox automatic toggling stops. But why?
The text was updated successfully, but these errors were encountered:
You might need to use $().prop() for your purpose.
Regardless, it does not appear to be a problem specific to jQTouch. I bet you see the same problem without jQTouch. If I were wrong, please reopen the issue.
Here a sample:
Every 2 seconds the checkbox change its value itself.
If the user click on the checkbox automatic toggling stops. But why?
The text was updated successfully, but these errors were encountered: