[jQuery] Toggle on TR.onclick but not on content link

[jQuery] Toggle on TR.onclick but not on content link


Hi,
I'm facing a "stupid" stuff.
I have a table. When I click on a TR, it displays another TR containing
datas :
<table>
<tr id="clickme_1" class="clickme">
    <td>
        Data - Data -
         http://www.site.com Link
        - Data
    </td>
</tr>
<tr id="showme_1" class="showme">
    <td>
        <div id="showmore_1" class="showmore">
            Extra Data -
            <div>Another Div</div>
            - http://www.site.com Extra Data
            - Extra Data
        </div>
    </td>
</tr>
</table>
It works perfectly with a toggle :
$(document).ready(function() {
    $("tr.clickme").click( function()
    {
        var ids = $(this).attr('id').split('_');
        var id = (ids[(ids.length-1)]);
        $("#showme_"+id+" >div").each(function(){ $(this).toggle(); });
        $("#showme_"+id).toggle();
    } );
});
But, when I click on a link (ID:link_1) inside the TR (ID:clickme_1), it
triggers the toggle effect.
I whish I could :
- click "anywhere" on the TR and trigger the toggle
- not trigger the toggle if i clicked on a link (juste open the new window)
The problem is that the first triggered effect is the TR click and I can't
find the way to prevent the effect when the link is clicked.
Can anyone help me ?
Freud
--
View this message in context: http://www.nabble.com/Toggle-on-TR.onclick-but-not-on-content-link-tf4956507s27240.html#a14193890
Sent from the jQuery General Discussion mailing list archive at Nabble.com.