Why won't my span do a JQuery event click when I click it?

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-03-24T01:11:13Z Indexed on 2010/03/24 1:13 UTC
Read the original article Hit count: 244

Filed under:
|
.tablePlayButton {
display: block;
width: 16px;
background: transparent;
margin-top:2px;
margin-right: -10px;
margin-left: 2px;
height:17px;
}

tr:hover .tablePlayButton {
background: url(ton.png) top left no-repeat;
}

tr:hover .tablePlayButton:active {
background-position: bottom left;
}

tr:hover .tablePlayButton.playing,
.tablePlayButton.playing {
background: url(ton2.png) top right no-repeat;
}

tr:hover .tablePlayButton.playing:active,
.tablePlayButton.playing:active {
background-position: bottom right;
}

I draw the span like this: <span class="tablePlayButton"></span>

It's got a little button. WHen I click it, nothing happens:

$(".tablePlayButton").click(function(){
        alert('hi');
    });

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript