Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat happen on my javascript? it's not working properly
    primarykey
    data
    text
    <p>I really don't know what wrong about my code, but it not working properly when i preview my HTML. Did i miss out anything!?</p> <p>Isuue, when click down, g1 and g2 working good, but when g2 i click on down button, it should be appear g3, but it jump to g4, and my up and down button are not working anymore :(</p> <pre><code>function chgPic(id) { $('#show').attr('src', id).stop(true, true).hide().fadeIn(); } //tooltip (rename the element to put tooltip on it "title") //$(document).ready(function() { // $("#simple").tiptip(); //}); function up() { if (document.getElementById('g1').style.display == 'block') { $('#g1').show(); $('#g2').hide(); $('#g3').hide(); $('#g4').hide(); } else if (document.getElementById('g2').style.display == 'block') { $('#g1').show(); $('#g2').hide(); $('#g3').hide(); $('#g4').hide(); } else if (document.getElementById('g3').style.display == 'block') { $('#g1').hide(); $('#g2').show(); $('#g3').hide(); $('#g4').hide(); } else if (document.getElementById('g4').style.display == 'block') { $('#g1').hide(); $('#g2').hide(); $('#g3').show(); $('#g4').hide(); } else { $('#g1').hide(); $('#g2').hide(); $('#g3').hide(); $('#g4').show(); } } function down() { if (document.getElementById('g1').style.display == 'block') { $('#g1').hide(); $('#g2').show(); $('#g3').hide(); $('#g4').hide(); } else if (document.getElementById('g2').style.display == 'block') { $('#g1').hide(); $('#g2').hide(); $('#g3').show(); $('#g4').hide(); } else if (document.getElementById('g3').style.display == 'block') { $('#g1').hide(); $('#g2').hide(); $('#g3').hide(); $('#g4').show(); } else { $('#g1').hide(); $('#g2').hide(); $('#g3').hide(); $('#g4').show(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload