Q:

Display current section number using fullpage.js

I have seen this question asked here BEFORE  and the answer helped... kind of.
I am using fullPage.js, I have a side bar and I have a div inside this sidebar which will display a number depending on which slide is active
I have a div
<div id="num" class="slideNumber"></div>

and I have this snippit
var slideNumber = $('.fp-section.active').find('.fp-slide.active').index() + 1;
 //do whatever here
    $('#num').text(slideNumber);

The number inside the div is displaying 0, then on scroll it refreshes that div to say 0 again each time a section is passed. I want this to instead change the number depending on which section its on.
Edit: I fixed it. Solution below:
 var slideNumber = $('.fp-section.active').index() + 1;
 //This will change the input of NUM to current section number
 $('#num').html(slideNumber);

A:

 var slideNumber = $('.fp-section.active').index() + 1;
 //This will change the input of NUM to current section number
 $('#num').html(slideNumber);

I removed
.find('.fp-slide.active')

and replaced
$('#num').text(slideNumber);

with
$('#num').html(slideNumber);

and it started outputting correctly inside the #num div

