0
0
0leg5ergeev2015-09-29 15:55:26
JavaScript
0leg5ergeev, 2015-09-29 15:55:26

How to exclude script execution from child elements?

In general, there is a script

<script>
    $(document).ready(function(){
      var $ops = $(".fullpage");
      $(".select2-selection").click(function () {            
         $ops.addClass('op');
      });
      
    });
    </script>


Executed when an element with the select2-selection class is clicked. there is also a script inverse to this, triggered by mousedown. So, apparently, on the child elements of the select2-selection class, the presented script also works, how can this be excluded?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivanq, 2015-09-29
@0leg5ergeev

Google to help you :)
www.askdev.ru/javascript/1311/%D0%9F%D1%80%D0%B8-%...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question