Sss bleaching through the team.



  • Hello.

    Doing. http://trutee.ru/test5/ ♪ And I want to turn my hat on the button. Turns around, turns around, but I also need to change the picture and position. But it's not happening.

    How do you fix that? Maybe that's the point:

     onclick="if (document.getElementById('spoiler').style.display != '') {getElementById('spoiler').style.display = '';document.getElementById('bottonHead').style.background = 'url(open.png)';document.getelementsbyclassname('body').style.bottom = '0px';}else {document.getElementById('spoiler').style.display = 'none';document.getElementById('bottonHead').style.background = 'url(close.png)';document.getElementsByClassName('body').style.bottom = '46px';}"
    


    • I'm recommending that the code be turned into a function, that it'll be more pleasant and understandable, or that's how it's done in the oncloth. ♪
    • I recommend jquery. The code's gonna be a little tighter. Compare:

    document.getElementsByClassName('body') and $('.body')

    • Use it. $('.body').show() and $('.body').hide()

    It's just a recommendation, as simple as that.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2