Anton Sementsov
Anton Sementsov

Reputation: 1246

Clickable td in IE

I have issue with cursor pointer on TD in IE 6++. There is a table cell with such HTML code, the click event BlockDay works only on second div, but i wrote it on all TD.

    <TD class="calnedar_td" onclick="BlockDay('1340571600');return false;">
    <DIV style="DISPLAY: inline; FLOAT: left"></DIV>
    <DIV style="DISPLAY: inline; FLOAT: right">Mon 25</DIV>
    </TD>

   .calnedar_td{
     height:105px;
     width:105px;
     vertical-align: top;
     text-align: left;
     padding: 3px;
     cursor:pointer;
    }

How can i made all td area clickable? Thank you, Anton.

Upvotes: 0

Views: 274

Answers (3)

Arcym
Arcym

Reputation: 490

I do believe you will have to put something inside the second DIV for you to click on..! I may be wrong, but the event handler may require something to actually be clickable before it can use the onclick event.

Upvotes: 0

srini.venigalla
srini.venigalla

Reputation: 5145

// place this in your ready event

$('td.calnedar_td').bind("click", function(){
           // whatever
});

Upvotes: 1

ph33nyx
ph33nyx

Reputation: 301

I believe you will need to place something inside of each TD that you with to make clickable this way. If the cell is not meant to have anything it, just add a non-breaking space as below:

<TD class="calnedar_td" onclick="BlockDay('1340571600');return false;">
    <DIV style="DISPLAY: inline; FLOAT: left">&nbsp;</DIV>
    <DIV style="DISPLAY: inline; FLOAT: right">Mon 25</DIV>
    </TD>

Upvotes: 0

Related Questions