Please see snippet below:

```
var mySwiper = new $('.swiper-container').swiper({
    pagination: '.pagination',
    loop:true,
    grabCursor: true,
    paginationClickable: true
});
function moveslide(n) {
    alert(mySwiper)
}

```

In alert, it shows "undefined" I am not sure why? `mySwiper` is global and it is out of function in same block!

Please guide.