I am modifying a third-party script so that I can style the output.

Here is a segment of the original code:

```
var tip_content = $('<div>').addClass('tip_content').load(url, function() {

```

Which produces this output:

```
<div class="tip_content">

```

I need to add another class to the output to style it differently on each page. Therefore, it seems like a good solution to add the current html page file name as a class.

But I have no experience with JS. 

Here is what I've managed to mangle together:

```
var tip_content = $('<div>').addClass('tip_content '+elem.attr('href')).load(url, function() {

```

Which produces this:

```
<div class="tip_content tickets.php?id=185">

```

This is almost exactly what I need. But I would be very grateful if someone could demonstrate how to trim the output to:

```
<div class="tip_content tickets">    

```