You are viewing limited content. For full access, please sign in.

Question

Question

Pagination Not Working In Forms

asked on October 7, 2015

I am attempting to setup on pagination in one of my forms and I have pasted my javascript below.  The names of my sections and corresponding css class are as follows

SECTION 1: SOL Portfolio Summary & SOL Documents Summary

section1 sections

SECTION 2: KNOW YOUR CLIENT

section2 sections

SECTION 3-1: INDIVIDUAL BENEFICIARY SUMMARY

section3 sections

SECTION 4: INVESTMENT VEHICLE

section4 sections

SECTION 5: FOR ENTITIES THAT SOL IS NOT CORRESPONDENT

section5 sections

SECTION 6: REVIEW AND APPROVAL

section6 sections


  //pagination
    $('.navitem').on('touchstart click', function () {
        $('.sections,.Submit').hide();
        $('.navbar').find('.navitem').removeClass('selected');
        if ($(this).hasClass('portfolio')) {
            $('.section1').show();
            $('.navbar').find('.portfolio').addClass('selected');
        }
        else if ($(this).hasClass('Client')) {
            $('.section2').show();
            $('.navbar').find('.Client').addClass('selected');
        }
        else if ($(this).hasClass('Beneficial')) {
            $('.section3').show();
            $('.navbar').find('.Beneficial').addClass('selected');
        }
      else if ($(this).hasClass)'Investment')) {
        $('.section4').show();
        $(.'navbar').find('.Investment').addClass('seclected');
      }
        else if ($(this).hasClass('Entities')) {
            $('.section5').show();
            $('.navbar').find('.Entities').addClass('selected');
        }
      else if ($(this).hasClass('Review')) {
        $(".section6, .Submit").show();
        $('.navbar').find('.Review').addClass('Review');
      }
    })
    $('.navitem.portfolio').trigger('click');
//end pagination
  

At the top of my form the tabs that I expect to appear are:

Portfolio Summary
Know Your Client
Beneficial Owner Summary
Investment Vehicle
For Entities that SOL is not Correspondent
Review and Approval
 
Currently, in my form that I expect to be tabs only appear as plain text with nothing that I can click or navigate to.
 
Does anyone have any recommendations on how to fix this?
0 0

Answer

APPROVED ANSWER
replied on October 7, 2015 Show version history

You're going to kick yourself...it's just a typo in your code.

Where you check to see if the clicked .navitem has the class "Investment", you have a close parenthesis instead of an open one in the .hasClass() method.

For the record, two lines below that, the period before "navbar" is outside the quotation marks, and in handling the last page you add the class "Review" instead of "selected".

Once those are fixed, the code runs fine.

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.