标签:
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <script src="jquery2.1.min.js"></script> | |
| <script type="text/javascript" > | |
| function test(){ | |
| var css=$("div").css("display"); | |
| if(css=="block"){ | |
| $("div").hide(); | |
| }else if(css=="none"){ | |
| $("div").show(); | |
| } | |
| } | |
| </script> | |
| <body> | |
| <div>看这里。。。</div> | |
| <input type="button" value="测试" onclick="test()"/> | |
| </body> | |
| </html> |
/**
* Created by yangming on 2015/8/6.
*/
function change_bill_detail(detail_id) {
var css=$("#" + detail_id).css("display");
if(css=="block"){
$("#icon-"+detail_id).removeClass("glyphicon glyphicon-triangle-top").addClass("glyphicon glyphicon-triangle-bottom");
$("#"+detail_id).hide();
}else if(css=="none"){
$("#icon-"+detail_id).removeClass("glyphicon glyphicon-triangle-bottom").addClass("glyphicon glyphicon-triangle-top");
$("#"+detail_id).show();
}
}
标签:
原文地址:http://www.cnblogs.com/pyfreshman/p/4720421.html