Skip to content

Instantly share code, notes, and snippets.

@dealingwith
Created September 25, 2010 23:06
Show Gist options
  • Save dealingwith/597397 to your computer and use it in GitHub Desktop.
Save dealingwith/597397 to your computer and use it in GitHub Desktop.
//force redraw for FF hot topic scrolling issue
//longer-term solution here is rework the markup towards more sanity
Collecta.Client.do_hot_topics_redraw = true;
$("#hot_topics").scroll(function(){
console.log("scroll");
//don't be doing this every scroll event,
//that's just a waste of good CPU
if (Collecta.Client.do_hot_topics_redraw === true) {
setTimeout(function() {
console.log("doing redraw");
var $this = $("#hot_topics");
var border = $this.css("border");
if (border === "0px solid black") {
$this.css("border","none");
}
else
{
$this.css("border","0px solid black");
}
Collecta.Client.do_hot_topics_redraw = true;
},250);
}
Collecta.Client.do_hot_topics_redraw = false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment