0

Is it possible using Twitter Bootstrap to make part of a row, or a certain number of cells clickable, akin to this problem, but not for the whole row?

How do I make bootstrap table rows clickable?

Community
  • 1
  • 1
user1149620
  • 863
  • 5
  • 14
  • 26

1 Answers1

1

Do you want each cell to be clickable? You could use code similar to that in the post you linked to:

$('.table td').click(function() {
    // cell was clicked
});

This will make every 'td' element clickable. If you want just some cells to be clickable, give them a special class and then reference that in the call. For instance, give your clickable cells a "clickable" class and use the following:

$('.table td.clickable').click(function() {
    // cell was clicked
});

Granted, this sets up a separate handler for each "td.clickable", rather than one event per row, but this can easily simulate making a portion of a row clickable.

NolanDC
  • 1,041
  • 2
  • 12
  • 35