Skip to content

Instantly share code, notes, and snippets.

@jgv
Created January 6, 2011 22:44
Show Gist options
  • Select an option

  • Save jgv/768754 to your computer and use it in GitHub Desktop.

Select an option

Save jgv/768754 to your computer and use it in GitHub Desktop.
$("div.hp_main_object").hover(function(){
$(this).find(".hp_griddy_panel").addClass("on");
$(this).children(".hp_griddy_title").css({
"background" : "rgb(137,137,137)",
"cursor" : "pointer",
"color" : "rgb(255,255,255)"
});
if ( $(this).children("h5.hp_object_title") === true ) {
$(this).children("h5.hp_object_title").css({
"color" : "rgb(255,255,255)",
"color" : "rgba(255,255,255,1)"
});
}
if ( $(this).children("div.hp_griddy_price h5") === true ) {
$(this).find("div.hp_griddy_price h5").css({
"background": "rgb(60,147,80)",
"color": "rgb(255,255,255)"
});
}
$(this).css("z-index", "664");
$(this).next("div").css({
"z-index" : "-51"
});
$(this).find(".hp_griddy_panel").stop().delay(400)
.animate({
"left" : "140px"
}, {
queue:true,
easing: "linear",
duration: 100,
step:function(){
// this is a temporary hack
console.log('step function');
/* if ( $(this).parent().hasClass("on") ) { */
$(this).show().css({
"z-index" : "-1"
});
$(this).children('form').addClass('on');
/*} else {
$(this).stop();
$(this).css("left" , "0px");
}; */
}
});
if ( !$(this).hasClass("omega") && !$(this).next().children(".doorway_card") ) {
$(this).next().children(".hp_griddy_price").fadeOut('fast');
}
}, function() {
//$("div.hp_main_object").live("mouseleave", function() {
console.log("this = " + $(this).children() + " in mouseleave");
$(this).find(".hp_griddy_panel").stop(true,false);
$(this).find(".hp_griddy_panel").hide().css({
"left" : "0px"
});
$(this).children(".hp_griddy_title").css({
"background" : "rgb(255,255,255)",
"cursor" : "auto"
});
if ( $(this).find("div.hp_griddy_price h5") == true ) {
$(this).find("div.hp_griddy_price h5").css({
"background" : "rgb(255,255,255)",
"color" : "rgb(54,54,54)"
});
}
if ( $(this).find("h5.hp_object_title") == true ){
$(this).find("h5.hp_object_title").css({
"color" : "rgb(54,54,54)",
"color" : "rgba(54,54,54,1)"
});
}
$(this).find(".hp_griddy_panel").css({
"display" : "none",
"left" : "0"
});
$(this).next().children(".hp_griddy_price").fadeIn('fast');
$(this).next("div").css({"z-index" : "1"});
// .animate({
// "left" : "140px",
// }, 100);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment