Below is the code snippet of JQuery code for Chaining vs Callback Function:-

```
$(selector).animate({ opacity: 1 }).animate({ opacity: 0.5 });

```

vs

```
$(selector).animate({ opacity: 1}, function()
{
    $(this).animate({ opacity: 0.5 });
});

```

In what type(s) of situation would one want to prefer one over the other?