javascript - Unresponsive buttons -


for reason have bug in code, causing buttons unresponsive.

can body see errors in code?

$('#arrowbutton').click(function(){      console.log('arrowbutton clicked');        $('#code2').animate({'opacity': '1'}, 350)  })
#arrow{      margin-left:384px;      z-index:15;      margin-top:50px;      width:25px;      z-index:20;      position:fixed;  }
<a id="arrowbutton"> <img src="images/step-22.png" id="arrow"> </a> 

i not getting errors , not getting console.log() message either.

any reasons why wouldn't working?

if have more 1 button id #arrowbutton can confused - or put event on 1 or break (depending on browser use)

ids need unique html page if want more 1 link have behaviour, should change class instead.

eg

<a class="arrowbutton"> <img src="images/step-22.png" id="arrow"> </a>   $('.arrowbutton').click(function(){     console.log('arrowbutton clicked');       $('#code2').animate({'opacity': '1'}, 350); }); 

(note: not tested, buggy)


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -