Question: I am changing the image on a `UISlider` thumb as follows:

```
[mySlider setThumbImage:thumbRegular forState:UIControlStateNormal];
[mySlider setThumbImage:thumbActive forState:UIControlStateHighlighted];

```

When I scrub, it all works as I expect, but when my finger falls off the thumb while scrubbing (drags outside), the thumb image changes back to "thumbRegular", even though the scrubbing itself continues normally. (And changes back to "thumbActive" as the dragging comes back inside).

Any ideas on how to correct this behaviour? Or is it expected behaviour?

Answer: 
Try using [`attr`](http://api.jquery.com/attr/):

```
$(this).attr("id")

```
You need to do this -

```
$(this).attr('id');

```