简体   繁体   English

如何在Wordpress中创建动态更改菜单?

[英]How Do I Create A Dynamic Changing Menu In Wordpress?

I saw this page: http://www.sklostudio.com/ 我看到了此页面: http : //www.sklostudio.com/

What's the easiest way to create this effect? 创建此效果的最简单方法是什么?

User does an action and it turns the menu a different color? 用户做一个动作,然后菜单变成了不同的颜色? I know the page was designed with Squarespace. 我知道页面是使用Squarespace设计的。

It is a JavaScript function, when the user click on the slideshow arrow, the onclick function will trigger in the same time therefore the menu color changed. 这是一个JavaScript函数,当用户单击幻灯片箭头时,onclick函数将在同一时间触发,因此菜单颜色会更改。

One of the easiest way to do the text color changing thing is: 做文本颜色更改的最简单方法之一是:

<script>

document.getElementById('change').onclick = changeColor;   

function changeColor() {
    document.body.style.color = "blue";
    return false;
}   

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM