fortherest fortherest - 5 months ago 19
jQuery Question

Trigger is not working on jquery-steps?

plugin which I used is http://www.jquery-steps.com/Examples#advanced-form (you can look at clicking by code to see)

and I want to make custom button or trigger but my trigger function is not working on this plugin why that ?

my jquery codes

$(document).ready(function(){
$('#go-next').click(function(){
$('a[href="#next"]').trigger('click');

})

})

Answer

It worked for me,

    $(document).ready(function(){
          $('#go-next').click(function(){
            $('a[href="#next"]').trigger('click');

          });
          $('a[href="#next"]').click(function(){
              alert('d');
          });
       });

<body>
    <a id="go-next" href="#">gonext</a>
    <a id="next" href="#next">next</a>
</body>