How to dynamically change themes after clicking a drop down menu of themes

前端 未结 6 1159
甜味超标
甜味超标 2020-12-12 18:01

I\'m using bootstrap for the interface of the website I\'m developing. I am also planning to integrate the bootswatch themes to my site. I have created a dropdown menu conta

6条回答
  •  一整个雨季
    2020-12-12 18:42

    I based mine off of @KevinPei's answer to make an automatic dropdown using jQuery, Bootstrap, and Bootswatch to add a dropdown to the navbar that automatically updates the theme to the selected value.

    Fiddle: https://jsfiddle.net/davfive/uwseLLzf/show

    The code works great in practice. However, in jsfiddle, there are two odd behaviors:

    1. Sometimes the dropdown extends to the whole screen
    2. The dropdown's mouseover/hover color isn't showing in jsfiddle.

    
    
        
        
        
        
    
    
    
    
    
    
    

提交回复
热议问题