Tuesday, April 5, 2011

jQuery and HTML visual glitches on table cell .toggle

I have table that gets dynamically created.

When using jQuery and toggle, everything works. I however get a small visual glitch - it seems the HTML sometimes get selected. How would I disable this on a faulty drag or mouse operation?

Is there a difference in the DOM between text in a cell and 'not text' or buffered space in a td?

Thanks in advance.

From stackoverflow
  • If you're saying that you want to disable text selection in your table, there are ways to do it using CSS. Although it doesn't work for IE or Opera as far as I know.

    #myTable {
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: -moz-none;
        -khtml-user-select: none;
    }
    

    Other than that, maybe some sort of invisible overlay element in your table cells?

    Forkrul Assail : That solved it. Perfect. Selection happened inadvertently when moving the mouse in an almost-drag way.

0 comments:

Post a Comment