我的javascript目前无法使用。我想,虽然我在这里,是否有任何我可以使用的程序,基本上可以让我犯错,这样我就可以自己解决问题?
...的Javascript
<script type="text/javascript" src="/js/jquery-ui.min.js">
$(document).ready(function() {
$(".button").click(function(){
$("#ticketTable").fadeOut( 'slow', function(){
});
});
});
</script>
用于淡出的按钮......
<button class="button">Respond</button>
我希望淡出的HTML ......
<div id="ticketTable">
<table border="1" width="1000" class="transparent">
<tr><th width="15%">Ticket</th><th width="15%">Queue</th><th width="15%">Severity</th><th width="15%">Created</th><th width="15%">Creator</th><th width="25%">Subject</th></tr>
</table></div>
答案 0 :(得分:0)
您的代码似乎很好,但您包含.JS文件的方式(以及稍后的初始化行为)似乎不正确。
尝试将此添加到您网页的<head>
代码中,然后更改您的JS <script>
代码:
<head>
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
<!--other script and also external css included over here-->
<script type="text/javascript">
$(document).ready(function() {
$(".button").click(function(){
$("#ticketTable").fadeOut( 'slow', function(){
});
});
});
</script>
</head>
<强> DEMO: JS Fiddle 强>