Re: TypeError: this.$firstLink is null

Home Forums Older releases 0.9.x TypeError: this.$firstLink is null Re: TypeError: this.$firstLink is null

#1618
admin
Keymaster

Hi,

About the first issue – I guess you call this on window resize so you can avoid the JS error (which is harmless, btw) by using a short timeout for the destroy call – i.e. instead of:

$('#drop-menu').smartmenus('destroy');

use this:

setTimeout(function() { $('#drop-menu').smartmenus('destroy'); }, 1);

Because on destroy the script unbinds its own resize handler but still it gets called for the same resize event. It’s a bit tricky to explain but anyway, just use the timeout if the JS error bothers you.

About the second “bug” – it’s not a bug, this is how it works by default. You can read this thread for more info and ways to customize the behavior:

http://www.smartmenus.org/forums/topic/submenu-is-open-indicator

Cheers!

Register

You will be emailed a link to set your password.

Login

Lost password?