Perfect Marquee
Hello People,
Today Iam Gonna Make A Tutorial For Marquee Codes, So Lets Start
Hosting
First We Need To Host jQuery 1.6.2: Here.
Then Some JavaScript Files:File1 & File2 (From RemySharp)
JavaScripts
and now lets add script to make the marquee works perfectly
- Code:
<script type="text/javascript">
<!--
$(function () {
$('div.demo marquee').marquee('pointer').mouseover(function () {
$(this).trigger('stop');
}).mouseout(function () {
$(this).trigger('start');
}).mousemove(function (event) {
if ($(this).data('drag') == true) {
this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
}
}).mousedown(function (event) {
$(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
}).mouseup(function () {
$(this).data('drag', false);
});
});
//-->
</script>
- Code:
('div.demo marquee')
HTML
And Now Lets Do The HTML Code
- Code:
<div class="demo">
<marquee behavior="scroll" direction="left" scrollamount="2">
<p>This Is A Perfect Smooth Marquee.</p>
</marquee>
</div>
Preview
Perfect Marquee
It's Info
- Smooth Sliding
- Stop OnHover
- Can Be Drag
- So Sexy
Normal Marquee
It's Info
- Harsh Sliding
- Never Stop
- Dream Of Draging it
- So Ugly
Enjoy, ArChKnIgHt
Last edited by ArChKnIgHt on 9/6/2011, 4:41 pm; edited 1 time in total