How to make clickable blocks (using jquery)


An article to help a good coder. Every good layout designer knows that the <a> tag is an inline element, only an inline element can be put inside it, but often in the design layout it is necessary to make the blocks clickable (for example, "block with news annotations").

What is the way out of this situation?

  • Include a bunch of blocks in the <a> tag and make the layout not valid (very bad way).
  • Use jquery (+ understandable html structure, valid code).
  • HTML
    <div class="post">
         <a href="#">News title</a>
         <p>some annotation text, some annotation text.</p>
            return false;

    PS And the fish here means that "You can't even catch a fish from a pond without labor)"

    Last in our blog

    Internet Marketing