How to slide one element through another element using animate()?

Hi i have this problem when creating a thumbnail slider.

I have 2 elements - <ul> with class B is nested inside div A:

<div class="a">
    <ul class="b">
      <li>1</li>
      <li>2</li>
      <li>3</li>
      ... etc
    </ul>
</div>

I would like to be able to move <ul> B to the right and left using some jQuery function like animate(). The problem is It doesn’t seem to work at all. Element <ul> B cannot be moved.

Maybe I did something wrong or maybe I just dont understand how it all works. Please help me.

Here is my CODEPEN link: https://codepen.io/anon/pen/wqGVaN

Just figured it out. Solved