0
jQuery를 사용하여 버튼으로 마키 동작을 제어 할 수 있기를 원합니다.jquery를 사용하는 버튼으로 마키 동작 제어
예를 들어, 나는 다음과 같은 버튼을 만들 때 나는 그들 각각을 클릭
1) Start (class=btnStart) => the marquee starts
2) Stop (class=btnStop) => the marquee stops
3) Back (class=btnBack) => the marquee move backward
4) Right (class=btnRight) => the marquee moves to right
5) Fast (class=btnFast) => the marquee moves faster
6) Slow (class=btnSlow) => the marquee moves slower
<body>
<div>
<marquee>Lots of contents here, scrolling right to left by default</marquee>
</div>
<div>
<button class="btnStart">Start</button>
<button class="btnStop">Stop</button>\
</div>
<script>
$(function(){
$(".btnStop").click(function(){
$("marquee").stop();// it does not work
});
$(".btnFast").click(function(){
$("marquee").attr("scrollamount","5"); // doesnt change speed
});
});
</script>
</body>
당신이 무엇을 시도했다 우리에게 보여주십시오. –
나는 지금까지 내가 시도한 것을 추가했다. 솔직히, 나는 내가하는 일을 모른다. –