jQuery与Bootstrap的问题
jQuery problems with Bootstrap
需要为即将到来的新项目学习引导程序的基础知识,但到目前为止,它伤害了我的大脑。
由于某些原因,我无法在网站上使用基本的jQuery。
以下是基本引导程序的jsFiddle:
http://jsfiddle.net/D2RLR/6891/
以下是薪酬结构:
<!DOCTYPE html>
<?php
// require the database connection / action class
require('libs/PHP_Classes/class.database.php');
require('libs/PHP_Classes/class.table.php');
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>PHPGamble</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="sticky-footer-navbar.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Begin page content -->
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Current Players On Table</h3>
</div>
<div class="panel-body" id="playerList">
Player 1 Player 2
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p class="text-muted">Copyright Craig Lovelock 2014</p>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
<script>
$(document).ready(function(){
$('#playerlist').html('ss');
});
</script>
</body>
</html>
playerlist不会更改html,.html()只是为了测试。我所尝试的一切都无效。。。
你可以在这个例子中看到它不起作用,在空白的小提琴中测试过它,当然它也很好。
看不出为什么会失败,这太简单了。
克雷格。
您正在调用playerlist
,而您应该调用playerList
。JavaScript区分大小写:
http://jsfiddle.net/D2RLR/6892/
jQuery运行良好,只需要将正确的id传递给jQuery即可。更改
$(document).ready(function(){
$('#playerlist').html('ss');
});
至
$(document).ready(function(){
$('#playerList').html('ss');
});
相关文章:
- Bootstrap一页导航Fluid网站最小化问题
- Bootstrap Accordion崩溃中的问题
- jquery抖动效应与bootstrap问题
- Bootstrap 4旋转木马组件问题
- tableTools初始化导致Bootstrap出现问题
- Twitter Bootstrap药丸的问题
- 将事件绑定到Bootstrap 3(button.js)按钮无线电时出现问题
- AngularJS和Bootstrap工具提示的范围界定问题
- AngularJs的ui.bootstrap问题-崩溃不起作用
- Bootstrap 和 jQuery 的问题
- 琐碎的JavaScript / Bootstrap下拉问题
- AngularJS Bootstrap UI,将数据传递到模态的问题.已选择卡未定义
- Bootstrap 3 / Wordpress 中的工具提示出现问题
- 按钮类切换问题与Bootstrap Accordion&银色条纹
- bootstrap日期选择器插件问题
- Bootstrap Popover中的点击问题和按钮警报
- Bootstrap Menu with“;更多“;选项响应性问题
- jQuery与Bootstrap的问题
- jQuery的执行顺序使用$.load()异步问题(bootstrap modal)
- 问题bootstrap 3旋转木马改变高度为0px和边缘为-…px