i had code to remove a tag with id or class ..But in this case the anchor tag is generated by wordpress as attachment and it doesnt have any id,class
ANCHOR TAG looks like this
<a rel="attachment wp-att-107 slb_group slb slb_internal" href="http://santasrecipies.com/myntra-model-5/4783157717_21b8d7199a_b/" >
Jquery ATTEMPTS made
but this function requires class or id of anchor tag which is absent here...
THE STRUCTURE is
<div id="imgContnr"> <a> <div><img></div> </a> </div>
I want to remove anchor tag inside div with id
I have using css by making
pointer-events:none; but it will affect all the anchor tags which is not right ..
Somehow i want it to happen using jquery ..Plz look into it ..
This will remove anchor tags whose parent is
Sorry, I misunderstood what you're trying to acheive. Although Just-lewis' answer works perfect, I'll post my alternative answer to that anyway. This code works the same except it's much shorter
This recipe can be found in it's original form on Stack Over Flow.