i have this code to detect change on my checkbox.
if is true turn on layer if is not true turn off layer
in my map service the layer have id 14
$(document).ready(function() {
$('#checkboxOrtofoto10m').change(function() {
if(this.checked) {
Layers.findSublayerById(14).labelsVisible = true;
}
});
in console mark this

any suggestions?