Question: I am working on the below demo. Why am I not able to pass the `$("#sample")` into a function like below functions?

```
function GetAtts(elem) {
  var x = elem.data('x');
  var y = elem.data('y');

 console.log(x + ' ' + y); 
}

function GetAttsThis(elem) {
  var x = this.data('x');
  var y = this.data('y');

 console.log(x + ' ' + y); 
}

GetAtts('sample');
GetAtts('$("#sample")');
GetAttsThis('sample');

```

Here is the demo:

```js
function GetAtts(elem) {
  var x = elem.data('x');
  var y = elem.data('y');

  console.log(x + ' ' + y);
}

function GetAttsThis(elem) {
  var x = this.data('x');
  var y = this.data('y');

  console.log(x + ' ' + y);
}

GetAtts('sample');
GetAtts('$("#sample")');
GetAttsThis('sample');
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input id="sample" type="text" data-x="5" data-y="20">
```

As you can see I am getting:

> 
> Uncaught TypeError: elem.data is not a function
> 
> 
> 

and:

> 
> Uncaught TypeError: this.data is not a function
> 
> 
> 

on both formats of functions.

Answer: 
Add these few lines of code to your table's CSS:

```
{
     border-spacing: 0 5px !important;
     border-collapse: separate !important;
}

```
you can add spaces between the row of the table by defining paddingBottom and paddingTop in the just like that

```
<TableCell style={{ paddingBottom: 10, paddingTop: 10 }} colSpan={2}>
           <Collapse in={open} timeout="auto" unmountOnExit>
               <Box margin={1}>
                   <Typography variant="h6" gutterBottom component="div">
                       ENGAGEMENT HISTORY
           </Typography>
                   <Table size="small" aria-label="purchases">
                       <TableHead>
                           <TableRow>
                               <TableCell>Date</TableCell>
                               <TableCell>Club</TableCell>
                               <TableCell align="right">Staff</TableCell>
                           </TableRow>
                       </TableHead>
                       <TableBody>
                           {row.engagementHistory.map((historyRow) => (
                               <TableRow key={historyRow.date}>
                                   <TableCell component="th" scope="row">
                                       {historyRow.date}
                                   </TableCell>
                                   <TableCell>{historyRow.contact}</TableCell>
                                   <TableCell align="right">{historyRow.staff}</TableCell>
                               </TableRow>
                           ))}
                       </TableBody>
                   </Table>
               </Box>
           </Collapse>
       </TableCell>

```

[![enter image description here](https://i.stack.imgur.com/PIsln.png)](https://i.stack.imgur.com/PIsln.png)