jQuery click event for document but ignore a div

32

You will most likely need to stop the propagation of events in your Comments div using the event object's stopPropagation() method:

$('#comments').click(function(e) {
  e.stopPropagation();
});

if that doesn't work try using preventDefault():

e.preventDefault();
Share:
32
tkk
Author by

tkk

Updated on July 09, 2022

Comments

  • tkk
    tkk almost 2 years

    I have a 100Bytes of data and calculated CRC-64 on the same. I have the CRC and 4 bytes of original data available (the 4 bytes are the last or first 4 bytes of data and we can choose it) Is it possible to rebuild the data?

    • rcgldr
      rcgldr over 5 years
      The data can't be rebuilt. You could set the unknown data to all zeroes except for 8 bytes and set the values of those 8 bytes to end up with a CRC-64 of zero.
  • user3788101
    user3788101 about 15 years
    Same goes for the comment box/textbox, etc.
  • RoboDev
    RoboDev about 15 years
    Thanks this worked great I did it on the DIV the they are in and it prevented it from happening to all of them.
  • Leniel Maccaferri
    Leniel Maccaferri almost 12 years
    Amazing... just what I was looking for!