jquery - Bootstrap 3 Dropdown Slidedown Strange Behavior when Navbar Collapsed -



jquery - Bootstrap 3 Dropdown Slidedown Strange Behavior when Navbar Collapsed -

so adding animations navbar dropdowns, reason accepted reply (adding slide effect bootstrap dropdown) seems break or become "regular" sized when sliding on little window sizes.

so weird thing seems happen slideup animation article posted:

// add together slidedown animation dropdown // $('.dropdown').on('show.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slidedown(5000); }); // add together slideup animation dropdown // $('.dropdown').on('hide.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slideup(5000); });

i can re-create , paste lines google chrome's console on http://bootswatch.com/default/, alter resolution 1 navbars collapse, , break. (i extended animation times seek , troubleshoot.)

normal:

broken slideup:

but reason, if run $('.navbar').find('.dropdown-menu').slideup(5000); normal behaving menu:

thoughts?

update works lastly alternative because doesn't remove 'open' class enclosing dropdown li element. perhaps open class beingness prematurely removed while animation running.

update 2 can sorta prepare using preventdefault:

// add together slideup animation dropdown // $('.dropdown').on('hide.bs.dropdown', function(e){ e.preventdefault(); $(this).find('.dropdown-menu').first().stop(true, true).slideup(300, function(){ $(this).parent().removeclass('open'); }); });

jquery twitter-bootstrap-3

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -