Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i want text alert on click prev or next button...? #534

Open
Kaushik0704 opened this issue May 24, 2017 · 1 comment
Open

i want text alert on click prev or next button...? #534

Kaushik0704 opened this issue May 24, 2017 · 1 comment

Comments

@Kaushik0704
Copy link

Kaushik0704 commented May 24, 2017

<div id='mySwipe' style='max-width:500px;margin:0 auto' class='swipe'>
  <div class='swipe-wrap'>
    <div><b>1</b></div>
    <div><b>2</b></div>
    <div><b>3</b></div>
    <div><b>4</b></div>
    <div><b>5</b></div>
    <div><b>6</b></div>    
  </div>
</div>



<div style='text-align:center;padding-top:20px;'>
  
  <button onclick='mySwipe.prev()'>prev</button> 
  <button onclick='mySwipe.next()'>next</button>

</div>

i Want next/prev div text alert on click prev or next button....?
Thanks In advance.

@imlinus
Copy link

imlinus commented Aug 28, 2017

Do you mean a callback?

window.mySwipe = $('.swipe-tabs').Swipe({
    callback: function(index, element) {
        alert('this is an alert');
    }
}).data('Swipe');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants