Exclude selector element-JQuery

0

I would like to apply a function that disables the click (which I found here) to several <div> , except the <a> with the class .ellipsis_inline that are within them.

But in the end it either blocks everything or does not block anything.

My selector

 $('.span6.record-cell > :not(.ellipsis_inline)').click(function (e) {
     e.stopPropagation();
     e.preventDefault();
     e.stopImmediatePropagation();
     return false;
 });

Divs structure

<div class="span6 record-cell" data-type="relate" data-name="tct_persona1_c">
<div class="record-label" data-name="tct_persona1_c">
    Cuenta 1
</div>
<span class="normal index" data-fieldname="tct_persona1_c" data-index="">
    <span sfuuid="1169" class="detail">
        <a class="ellipsis_inline" data-placement="bottom" title="" href="#Accounts/b7a86eb2-a490-11e8-b856-00155da06f04" data-original-title="PEPE PROBLEMAS">PEPE PROBLEMAS</a>
    </span>
</span>
<span class="record-edit-link-wrapper" data-name="tct_persona1_c" data-wrapper="edit" tabindex="-1">
    <a class="record-edit-link btn btn-invisible" data-type="relate" data-name="tct_persona1_c"><i class="fa fa-pencil"></i></a>
</span>
<span class="record-lock-link-wrapper hide" data-name="tct_persona1_c">
    <a class="record-lock-link btn btn-invisible" data-type="relate" data-name="tct_persona1_c">
        <i class="fa fa-lock" rel="tooltip" data-original-title="Este campo está bloqueado porque está implicado en un proceso en ejecución." data-placement="right"></i>
    </a>
</span></div>
    
asked by Jess182 14.09.2018 в 21:24
source

1 answer

0

$('.span6.record-cell').not('.ellipsis_inline').click(function (e) { e.stopPropagation(); e.preventDefault(); e.stopImmediatePropagation(); return false; });

    
answered by 14.09.2018 в 23:57