views:

31

answers:

3

Hello

<div class="leftlink" id="mcontacts">
    <img src="test.gif" class="arrowred"/>
    <a href="/contacts/" class="u">Контакты</a>
</div>

if(window.location == 'http://my.site.com/contacts/')
{
    $('.menuwelcome').css('display', 'block');
    $('.leftlink').find('Контакты').css('font-weight', 'bold');
    $('#mcontacts').find('a').html('<b>Контакты</b>').remove();
}

How do remove tag "a" html, and change his for '<b>Контакты</b>' ? =) Than you, sorry for bad english

+2  A: 

Not sure what you're trying to achieve with the first two lines of JavaScript here, but here's a way you could do what you ask for:

var link = $('#mcontacts a'),
  linkValue = link.html();

link.replaceWith('<b>' + linkValue + '</b>');
Jimmy Cuadra
A: 

.......

$('#mcontacts a.u').remove();
$('<b>Контакты</b>').appendTo($('#mcontacts'));
Sarfraz
A: 
$('#mcontacts a').wrapInner('<b />')
toniL