I have such a problem. made the menu on the jQurey menu works fine except on IE7. The menu does not respond to anything. Please tell me what the problem is. Code - HTML

<body> <ul id="list"> <li id="1">Ссылка1<span class="list1">[<span id="list1">0</span>]</span></li> <li id="2">Cсылка2<span class="list1">[<span id="list2">0</span>]</span></li> <li id="3">Ссылка3<span class="list1">[<span id="list3">0</span>]</span></li> <li id="4">Ссылка4<span class="list1">[<span id="list4">0</span>]</span></li> <li id="5">Ссылка5<span class="list1">[<span id="list5">0</span>]</span></li> </ul> 

Code - CSS

  #list .list1 {display:none; float:right; margin-right:180px; } #list {background:silver; width:381px; list-style:none; border:1px solid #000; } #list li { width:281px; height:21px; background:url(../img/menu-line.gif) no-repeat; color:blue; fons-size:15px; padding-left:60px; } .noactive { margin-left:20px; } .active { margin-left:0px; } 

Code - jQuery

 $(function() { $('#list li').click(function() { var current = $(this); var id = current.attr('id'); var str = "#list"+ id; var number = parseInt($(str).text()); number = number +1; $(this).find('span.list1').show(); if (number <5) { $(str).html(number); $('li').each(function(){ $(this).css('margin-left','0'); }); $('li').each(function() { $(this).animate({ width: "70%", marginLeft: "0.4in", fontSize: "1em", }, 500 ); }); current.animate({margin:'0'}, {duration:1000}); } else { $(this).remove(); } }) }) 
  • in the name of the browser?) - Gorets
  • not in the name but in it: D - Zowie

2 answers 2

Immediately you can select

 `fontSize: "1em",` 

extra comma

  • It worked. just one click away. when you click the menu again, it hangs again. and curly braces have disappeared somewhere else. By the way, here is the task that the menu should do. When you click on a link, all the others move to the side. When you click on another link, everything returns to its original position, and then moves relative to the current one, as in paragraph 1. After clicking on a link, a click counter is added to its text (for example, “Link [2]”), and for each click the counter value increases. Before the first click the reference link does not have ("Link"). After (5) clicks the link disappears from the list. - murad30
  • it probably did not hang, but a js-error occurred, turn on error output in i, to see messages, by the way, I noticed current.animate ({margin: '0'}, probably should be {marginRight: '0'} - makregistr

Found a problem. it's magrin
current.next (). animate ({marginLeft: '20px'}, {duration: 200});
Thanks to everyone who responded to my question.