Sharerepoint Online megamenu - all of a sudden no working anymore

I Use the SharePoint megamenu javascript solution for a while now. Works fine but all of a sudden it does not work anymore and gives me "Populatefromlist is not defined". I have no clue, did not change a thing.

Got my code from here:

http://www.designchemical.com/lab/jquery-mega-drop-down-menu-plugin/getting-started/

http://blog-aspc.azurewebsites.net/so-whats-on-the-megamenu/

This is my code:

<link href="https://blabla.sharepoint.com/script/css/skins/black.css" rel="stylesheet" type="text/css" />

<script src="https://blabla.sharepoint.com/script/jquery-1.11.1.min.js"></script>

<script src="https://blabla.sharepoint.com/script/js/jquery.hoverIntent.minified.js"></script>
<script src="https://blabla.sharepoint.com/script/js/jquery.dcmegamenu.1.3.3.js"></script>

<script>

$(document).ready(function () {
var topmenuClass = '.ms-core-listMenu-horizontalBox';
$(topmenuClass + ' .ms-hidden').html('');
$(topmenuClass + ' ul li a span').not('[class="ms-navedit-editLinksIconWrapper"]').replaceWith(function () {
            return $(this).html();
        });

        $(topmenuClass + ' a').each(function () {
            var title = $(this).html();
            var strs = title.split("#");
            if (strs.length > 1) {
                $(this).html(strs[0]);
                $(this).parent().attr('id', strs[1]);
                PopulateFromList($(this).parent());
            }
        });

        $(topmenuClass + ' .ms-core-listMenu-root').attr('id', 'mega-menu-tut');
        $(topmenuClass + ' ul').removeClass();
        $(topmenuClass + ' li').removeClass();
        $(topmenuClass + ' a').removeClass();
        $('#mega-menu-tut').removeClass().addClass('menu');
        $(topmenuClass).removeClass();

        $('#mega-menu-tut').wrap('<div id="kiosk-searcharea" class="dcjq-mega-menu" />');

        $('#mega-menu-tut').dcMegaMenu({
            rowItems: '5',
            speed: 'slow',
            effect: 'slide',
            fullWidth: false
        });
    });

</script>

Can someone put me in the right direction?

Thanks, Mike



June 30th, 2015 2:16pm

Hi Mike,

According to your description, the custom script stop working any more all of a sudden.

Based on the error message, the PopulateFromList() function seems not been defined before it is called in the script. Since it used to work, a guess is that the related JavaScript library which contains the definition of this function is not being loaded properly.

A suggestion is that you can debug the script in browser using IE Developer Tools, it will give you more details about this issue.

https://msdn.microsoft.com/en-us/library/ie/bg182326(v=vs.85)

Thanks
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2015 3:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics