Thanks Andi, Yes, I meant an unordered list as you showed.
Rather than remove the <a> tag, is it possible to just 'deactivate' it? i.e. when you click it, nothing happens, but the <a> tag stays in place? I ask, because I'd like to keep the CSS as simple as possible. Thanks, osu On Sep 24, 6:05 pm, Andi23 <dowhatyouw...@gmail.com> wrote: > First of all, let's clarify the actual HTML. I assume this is what > you have: > <ul> > <li><a href="#">Link 1</a></li> > <li><a href="#">Link 2</a></li> > <li><a href="#">Link 3</a> > <ul> > <li><a href="#">Link 3a</a></li> > <li><a href="#">Link 3b</a></li> > <li><a href="#">Link 3c</a></li> > </ul> > </li> > <li><a href="#">Link 4</a></li> > </ul> > > When you say "remove the link", I assume you want to turn this: > <li><a href="#">Link 3</a> > into this: > <li>Link 3 > > Given that, try this jQuery: > $("li ul").siblings("a").each(function(){ > $(this).replaceWith($(this).html()); > > });