Показать сообщение отдельно
  #1 (permalink)  
Старый 19.07.2012, 13:50
Аспирант
Отправить личное сообщение для Hol1killer Посмотреть профиль Найти все сообщения от Hol1killer
 
Регистрация: 17.07.2012
Сообщений: 34

Почему не удаляется ID
Ребят обьясните почему это код не удаляет атрибут ID у всех тегов?

[JS]<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script>
jQuery(document).ready(function($) {
$('#1').click(function(){
 $('*').removeAttr('id class style');
});
});
</script>


<body>
<button id="1" > Нажми</button>
 <map name="metro_map">
        <area shape="rect"  href="#" coords="508,308,578,317" />
        <area shape="rect"  href="#" coords="389,490,464,499" />
        <area shape="rect"  href="#" coords="124,584,199,593" />
        <area shape="rect"  href="#" coords="0,0,0,0" />
        <area shape="rect"  href="#" coords="127,408,231,417" />
        <area shape="rect"  href="#" coords="389,109,456,118" />
        <area shape="rect"  href="#" coords="315,59,369,68" />
        <area shape="rect"  href="#" coords="258,664,298,673" />
        <area shape="rect"  href="#" coords="181,418,237,426" />
        <area shape="rect"  href="#" coords="205,392,260,401" />
        <area shape="rect"  href="#" coords="0,0,0,0" />
        <area shape="rect"  href="#" coords="150,99,199,108" />
        <area shape="rect"  href="#" coords="389,69,459,78" />
        <area shape="rect"  href="#" coords="51,296,133,305" />
        <area shape="rect"  href="#" coords="118,259,187,268" />
        <area shape="rect"  href="#" coords="508,228,569,237" />
        <area shape="rect"  href="#" coords="142,198,184,207" />
        <area shape="rect"  href="#" coords="167,238,233,247" />
        <area shape="rect"  href="#" coords="167,238,233,247" />
        <area shape="rect"  href="#" coords="156,624,199,633" />
        <area shape="rect"  href="#" coords="315,69,364,78" />
        <area shape="rect"  href="#" coords="234,408,338,417" />
        <area shape="rect"  href="#" coords="240,418,303,427" />
        <area shape="rect"  href="#" coords="389,89,474,98" />
        <area shape="rect"  href="#" coords="406,624,480,633" />
        <area shape="rect"  href="#" coords="289,692,353,705" />
        <area shape="rect"  href="#" coords="289,734,393,743" />
        <area shape="rect"  href="#" coords="289,754,372,763" />
        <area shape="rect"  href="#" coords="389,99,420,108" />
        <area shape="rect"  href="#" coords="312,536,373,545" />
        <area shape="rect"  href="#" coords="315,89,372,98" />
        <area shape="rect"  href="#" coords="120,69,199,78" />
        <area shape="rect"  href="#" coords="139,79,199,88" />
        <area shape="rect"  href="#" coords="489,624,580,633" />
        <area shape="rect"  href="#" coords="406,604,456,613" />
        <area shape="rect"  href="#" coords="16,197,92,205" />
        <area shape="rect"  href="#" coords="17,624,95,633" />
        <area shape="rect"  href="#" coords="127,347,197,356" />
        <area shape="rect"  href="#" coords="489,664,531,673" />
        <area shape="rect"  href="#" coords="157,109,199,118" />
        <area shape="rect"  href="#" coords="206,178,273,187" />
        <area shape="rect"  href="#" coords="289,486,362,495" />
        <area shape="rect"  href="#" coords="323,654,398,663" />
        <area shape="rect"  href="#" coords="316,210,381,218" />
        <area shape="rect"  href="#" coords="406,574,457,583" />
        <area shape="rect"  href="#" coords="508,188,579,197" />
        <area shape="rect"  href="#" coords="143,614,199,623" />
        <area shape="rect"  href="#" coords="319,624,398,633" />
        <area shape="rect"  href="#" coords="301,593,359,602" />
        <area shape="rect"  href="#" coords="389,512,447,521" />
        <area shape="rect"  href="#" coords="389,512,447,521" />
        <area shape="rect"  href="#" coords="155,368,193,374" />
        <area shape="rect"  href="#" coords="0,0,0,0" />
        <area shape="rect"  href="#" coords="0,0,0,0" />
        <area shape="rect"  href="#" coords="0,0,0,0" />
        <area shape="rect"  href="#" coords="353,348,417,357" />
        <area shape="rect"  href="#" coords="353,348,417,357" />
        <area shape="rect"  href="#" coords="406,584,473,593" />
        <area shape="rect"  href="#" coords="389,500,454,509" />
        <area shape="rect"  href="#" coords="385,258,464,267" />
        <area shape="rect"  href="#" coords="385,258,464,267" />
        <area shape="rect"  href="#" coords="149,634,199,643" />
        <area shape="rect"  href="#" coords="303,670,398,679" />
        <area shape="rect"  href="#" coords="100,267,195,278" />
        <area shape="rect"  href="#" coords="489,99,568,108" />
        <area shape="rect"  href="#" coords="371,272,447,281" />
        <area shape="rect"  href="#" coords="455,438,561,447" />
        <area shape="rect"  href="#" coords="208,435,282,444" />
        <area shape="rect"  href="#" coords="14,226,80,235" />
        <area shape="rect"  href="#" coords="247,311,325,320" />
        <area shape="rect"  href="#" coords="489,644,544,653" />
        <area shape="rect"  href="#" coords="16,261,78,270" />
        <area shape="rect"  href="#" coords="16,261,78,270" />
        <area shape="rect"  href="#" coords="420,316,467,325" />
        <area shape="rect"  href="#" coords="420,316,467,325" />
        <area shape="rect"  href="#" coords="71,316,135,325" />
        <area shape="rect"  href="#" coords="128,574,199,583" />
        <area shape="rect"  href="#" coords="286,320,333,328" />
        <area shape="rect"  href="#" coords="406,614,452,623" />
        <area shape="rect"  href="#" coords="414,393,491,405" />
        <area shape="rect"  href="#" coords="315,188,386,196" />
        <area shape="rect"  href="#" coords="406,634,452,643" />
        <area shape="rect"  href="#" coords="406,643,456,653" />
        <area shape="rect"  href="#" coords="406,653,473,663" />
        <area shape="rect"  href="#" coords="402,670,457,680" />
        <area shape="rect"  href="#" coords="227,263,293,275" />
        <area shape="rect"  href="#" coords="388,59,450,68" />
        <area shape="rect"  href="#" coords="127,337,205,346" />
        <area shape="rect"  href="#" coords="198,211,273,220" />
        <area shape="rect"  href="#" coords="16,185,56,195" />
        <area shape="rect"  href="#" coords="16,237,78,245" />
        <area shape="rect"  href="#" coords="15,206,67,215" />
        <area shape="rect"  href="#" coords="235,557,298,566" />
        <area shape="rect"  href="#" coords="249,568,298,576" />
        <area shape="rect"  href="#" coords="213,577,298,586" />
        <area shape="rect"  href="#" coords="508,278,570,287" />
        <area shape="rect"  href="#" coords="345,395,409,402" />
        <area shape="rect"  href="#" coords="190,223,273,232" />
        <area shape="rect"  href="#" coords="116,664,199,675" />
        <area shape="rect"  href="#" coords="118,604,199,613" />
        <area id="st35" shape="rect"  href="#" coords="183,478,249,487" />
        <area id="st162" shape="rect"  href="#" coords="183,478,249,487" />
        <area id="st78" shape="rect"  href="#" coords="100,178,184,187" />
        <area id="st148" shape="rect"  href="#" coords="353,644,398,653" />
        <area id="st57" shape="rect"  href="#" coords="315,79,364,88" />
        <area id="st44" shape="rect"  href="#" coords="288,355,352,364" />
        <area id="st31" shape="rect"  href="#" coords="382,450,444,459" />
        <area id="st32" shape="rect"  href="#" coords="382,450,444,459" />
        <area id="st170" shape="rect"  href="#" coords="50,375,113,384" />
        <area id="st161" shape="rect"  href="#" coords="132,447,204,457" />
        <area id="st37" shape="rect"  href="#" coords="132,447,204,457" />
        <area id="st173" shape="rect"  href="#" coords="508,198,577,207" />
        <area id="st133" shape="rect"  href="#" coords="508,178,578,187" />
        <area id="st135" shape="rect"  href="#" coords="508,288,547,297" />
        <area id="st69" shape="rect"  href="#" coords="289,129,354,142" />
        <area id="st146" shape="rect"  href="#" coords="406,594,459,603" />
        <area id="st87" shape="rect"  href="#" coords="31,276,89,285" />
        <area id="st56" shape="rect"  href="#" coords="130,137,184,147" />
        <area id="st122" shape="rect"  href="#" coords="455,361,537,370" />
    </map>
Ответить с цитированием