为了做到这一点,我关注了this链接。
我的代码是:
<script src='jquery-1.10.1.min.js'></script> // this file is in the same folder.
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle', //class of the element that will be your tab
pathToTabImage: 'contact_tab.gif', //path to the image for the tab *required*
imageHeight: '122px', //height of tab image *required*
imageWidth: '40px', //width of tab image *required*
tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left
speed: 300, //speed of animation
action: 'click', //options: 'click' or 'hover', action to trigger animation
topPos: '200px', //position from the top
fixedPosition: false //options: true makes it stick(fixed position) on scroll
});
});
</script>
<style>
.slide-out-div {
padding: 20px;
width: 250px;
background: #ccc;
border: 1px solid #29216d;
}
</style>
<html>
<head>
</head>
<body>
<div class="slide-out-div">
<a class="handle" href="http://link-for-non-js-users">Content</a>
<h3>This is extra content</h3>
<p>Something that wasn't important enough to be in your main body,
but that you wanted to hide off the side of your screen for some reason.
</p>
<p>Could be a form to submit feedback, or contact info</p>
</div>
</body>
</html> 但是当我在浏览器中运行这个文件时,我得到了输出:

我应该怎么做才能让标签完全打开以显示表单?
发布于 2014-07-08 19:52:08
看起来您尚未在您的html页面中链接该插件。确保已将其添加到query之后
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>
//you're missing this.发布于 2014-07-08 19:54:11
我想你忘了加jquery.tabSlideOut.js了。请看演示here的示例代码和下面的代码行:
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>发布于 2014-07-08 19:55:43
你所有的scrpt和style都应该放在html的头部分。请安排一下
<html>
<head>
<script src='jquery-1.10.1.min.js'></script> // this file is in the same folder.
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle', //class of the element that will be your tab
pathToTabImage: 'contact_tab.gif', //path to the image for the tab *required*
imageHeight: '122px', //height of tab image *required*
imageWidth: '40px', //width of tab image *required*
tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left
speed: 300, //speed of animation
action: 'click', //options: 'click' or 'hover', action to trigger animation
topPos: '200px', //position from the top
fixedPosition: false //options: true makes it stick(fixed position) on scroll
});
});
</script>
<style>
.slide-out-div {
padding: 20px;
width: 250px;
background: #ccc;
border: 1px solid #29216d;
}
</style>
</head>
<body>
<div class="slide-out-div">
<a class="handle" href="http://link-for-non-js-users">Content</a>
<h3>This is extra content</h3>
<p>Something that wasn't important enough to be in your main body,
but that you wanted to hide off the side of your screen for some reason.
</p>
<p>Could be a form to submit feedback, or contact info</p>
</div>
</body>
</html> https://stackoverflow.com/questions/24631073
复制相似问题