-2

I'm attempting to remove the inline style beside dropdown-menu attribute.

<ul role="menu" class=" dropdown-menu" style="display: none;">

I tried using jQuery(".dropdown-menu").removeAttr("style"); but it won't remove. What other way to remove this inline display none?

Please refer to the attached image

enter image description here

Melvin Rey
  • 147
  • 3
  • 17

1 Answers1

0

you can use .removeAttr() for this

$('.dropdown-menu').removeAttr('style');

or you want to show/hide element using jQuery then you can use .toggle()

$('.dropdown-menu').toggle();

or you can use .show():

$('.dropdown-menu').show();

or you can use .fadeIn():

$('.dropdown-menu').fadeIn();
Super User
  • 9,448
  • 3
  • 31
  • 47