Good day.
I now have such an error, when debugging displays such a message. I can not figure out how to fix it. I myself am a beginner, so I do not understand how to solve this problem.

Error while analyzing the “margin” value. Lost ad.
An empty string cannot be an argument of the getElementById () method.

Points to

$(this).animate({margin:'0 0 0 20px'}, {duration:200}); 

The problem is that IE7 does not appear, but I really need it to work. Help to make out a mistake.

    2 answers 2

    In my opinion, the description of the error is quite understandable. It cannot have a tag <br/> . The animate() syntax contains only the final values, the transition speed, and the callback function. That is, remove this tag from the declaration of the animante() method. If you fundamentally need to insert <br/> , then you can use something like this:

     $(this).append('<br\/>'); 
    • LOL and mine <br> is the problem that the author is not yet familiar with how to draw the code correctly here, is it not? xDDD - Zowie
    • <br> fl I added to go to a new line I thought that the page will be displayed in one line. - murad30

    Can you work separately with each indent? like this for example

     $(this).animate({marginLeft:'20px'},{duration:200}); 
    • oh yes, if the author understood approximately how .animate () works, such a question would not arise ... <br> <b> Andrey Surzhikov </ b> you are absolutely right, if you need to do this, then you should use marginLeft, marginRight, marginTop и marginBottom ... - Zowie