Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Event for tabclick?

Questions related to using nuBuilder Forte.
Post Reply
ARWEN
Posts: 78
Joined: Thu Nov 01, 2018 6:01 am

Event for tabclick?

Unread post by ARWEN »

HI,

I want to know when the first tab is clicked to show the save button. when the 2nd tab is selected, the save button will disappear.

I attached a click event to nuTab0

Code: Select all

$("#nuTab0").click(function(){
    nuShow('nuSaveButton');
});  
but that leads to an error "Maximum call stack size exceeded"

Because nuShow() calls nuOpenTab() which calls again $('#nuTab' + i).click() ....

Call stack: Click ->nuShow() --> nuOpenTab() -> $('#nuTab' + i).click() --> Click .... --> Uncaught RangeError: Maximum call stack size exceeded

How to solve this?
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Event for tabclick?

Unread post by admin »

ARWEN,

Try this...

Code: Select all

$("#nuTab0").click(function(){
    $('#nuSaveButton').show();
}); 

Steven
ARWEN
Posts: 78
Joined: Thu Nov 01, 2018 6:01 am

Re: Event for tabclick?

Unread post by ARWEN »

Thanks!! It was so easy, and yet I didn't think of it.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Event for tabclick?

Unread post by admin »

Cool.
Post Reply