I am attempting to have a marquee pause on hover and continue on mouseOut
I tried by including this but it does not work
marquee.hover(
function() {
go = false;
},
function() {
go = true;
}
);
Can anyone suggest what I am doing wrong here?
$(function() {
var marquee = $("#marquee");
marquee.css({"overflow": "hidden", "width": "100%"});
marquee.hover(
function() {
go = false;
},
function() {
go = true;
}
);
// wrap "My Text" with a span (IE doesn't like divs inline-block)
marquee.wrapInner("<span>");
marquee.find("span").css({ "width": "50%", "display": "inline-block", "text-align":"center" });
marquee.append(marquee.find("span").clone()); // now there are two spans with "My Text"
marquee.wrapInner("<div>");
marquee.find("div").css("width", "200%");
var reset = function() {
$(this).css("margin-left", "0%");
$(this).animate({ "margin-left": "-100%" }, 28000, 'linear', reset);
};
reset.call(marquee.find("div"));
});