如何添加幻灯片效果以显示隐藏的div?
#!/usr/bin/env python
import multiprocessing
import subprocess
import psutil
def run_command():
pipe = subprocess.Popen("ls", stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True)
out, err = pipe.communicate()
print out, err
def msg(number):
print "hello %s" %(number)
run_command()
def main():
print "yes"
procs = []
print multiprocessing.cpu_count()
for i in range(0, 5, 1):
process = multiprocessing.Process(target=msg, args=(i,))
procs.append(process)
for proc in procs:
proc.start()
psutil.Process(proc.pid).children()
for proc in procs:
proc.join()
if __name__ == "__main__":
main()

function show() {
var x = document.getElementById("info");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}

先谢谢你。
答案 0 :(得分:0)
我找到了一种方法来使用jquery 3.3.1:
$(document).ready(function(){
$("#show").click(function(){
$("#info").toggle(300);
});
});

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<a href="#" id="show">SHOW HIDDEN DIV</a>
<div id="info" style="display:none;">I WAS HIDDEN</div>
&#13;