Use the event to remove the problems encountered in the shadow in the bootstrap drop-down box?

the default drop-down box of bootstrap has this shadow

clipboard.png

I use the JavaScript event to cancel the drop-down menu and click Inner Shadow

  $(".dropdown").on("show.bs.dropdown", function () {
    $(".dropdown-toggle").css("boxShadow","none")
  });
  

but the strange event encountered is that there is still an inner shadow on the first click after the page is refreshed, but there is no such shadow on the button after the second click. What is this situation?

is there a boss who knows the cause of this problem, or is there a better way to cancel the inner shadow of this button? Thank you

Sep.22,2021

put your js
$(".dropdown-toggle"). Css ('boxShadow','none') in the initialization execution
Don't put it in the dropped event

clipboard.png


@ clipboard.png

my writing like this still doesn't solve that weird problem. Awkward


. Why should the style be changed in the event? Can't you just overlay a high-weight style or change the default style in css?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4be8c-593f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4be8c-593f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?