2 Replies - 1804 Views - Last Post: 14 April 2016 - 10:02 AM

#1 dday9   User is offline

  • D.I.C Regular

Reputation: 95
  • View blog
  • Posts: 495
  • Joined: 17-April 13

OnVisible Event

Posted 14 April 2016 - 09:33 AM

I need an even for when the last fieldset becomes visible as I'm using a step-by-step form that toggles the visibility of the various fieldsets. I have tried:
$("#msform fieldset:last").on('visible', function() {
  alert();
});


Using the alert as a test to see if the event would fire, but nothing happens.
Is This A Good Question/Topic? 0
  • +

Replies To: OnVisible Event

#2 andrewsw   User is offline

  • no more Mr Potato Head
  • member icon

Reputation: 6957
  • View blog
  • Posts: 28,696
  • Joined: 12-December 12

Re: OnVisible Event

Posted 14 April 2016 - 09:43 AM

There is no 'visible' event. You could either call code at the point that the element is made visible, or perhaps investigate custom events, if you feel this is more appropriate.
Was This Post Helpful? 1
  • +
  • -

#3 dday9   User is offline

  • D.I.C Regular

Reputation: 95
  • View blog
  • Posts: 495
  • Joined: 17-April 13

Re: OnVisible Event

Posted 14 April 2016 - 10:02 AM

Ok, what I did was placed the following code in my 'next' button's onclick event:
if($('form fieldset:last').is(':visible')) {
  alert();
}

Thank you so much!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1