嗨,我需要能够滚动/单击一些项目符号并定位页面上其他位置的 div(描述)替换其中的文本。有没有人有任何想法?,我真的很感激任何帮助 - 谢谢!
JS
$(document).ready(function(){
$('.bullet').click(function(){
$('.bullet').removeClass("active");
$(this).addClass("active");
});
});
CSS
.bullet {
display:block;
margin: 0 0 0 3px;
float: right;
width:10px;
height:10px;
background:url(../images/bullets.jpg) 0 0 no-repeat;
}
.bullet:active {
display:block;
margin: 0 0 0 3px;
float: right;
width:10px;
height:12px;
background:url(../images/bullets.jpg) 0 -14px no-repeat;
}
.numbers a {
display: block;
}
.numbers a div {
font-family: HelveticaNeueLTPro-Roman, Arial, Helvetica, sans-serif;
font-size: 9px;
color: #6e6965;
margin: -10px 0 0 0px;
position: absolute;
display:none;
}
.numbers a:hover div, .numbers a:focus div {
display: block;
}
HTML
<div id="bullet-container"><div class="numbers">
<span onmouseover="document.rollimg.src=image1.src;">
<a class="bullet" tabindex="-1">
<div>1</div>
</a>
</span>
<span onmouseover="document.rollimg.src=image2.src;">
<a class="bullet" tabindex="-1">
<div>2</div></a>
</span>
<span onmouseover="document.rollimg.src=image3.src;">
<a class="bullet" tabindex="-1">
<div>3</div>
</a>
</span>
<span onmouseover="document.rollimg.src=image4.src;">
<a class="bullet" tabindex="-1">
<div>4</div>
</a>
</span>
</div>
<div class="description">hello</div>