How do i target this 'h4' when it's parent is a 'var'
Hi there,
hoping you can help me here. it's a scroll-to and then highlight effect.
tutorial came from www.corydorning.com/blog/jquery-faqs-scroll-and-highlight-tutorial
i need to target an h4 inside the div we scroll to. the h4 is called : h4.pink
here's the code.
- $(function() {
$("#questions > li").click(function() {
var qu = $(this).attr("id");
var an = "#" + qu.replace("q","a");
$.scrollTo(an, {duration: 800, axis:"y", onAfter:function(){
$(an).effect("highlight", {color: "#ff33ff"}, 2000);
}
});
});
$(".return-top").click(function() {
$.scrollTo("#topx", {duration: 800, axis:"y"});
});
});
i know the line we need to edit is:
- $(an).effect("highlight", {color: "#ff33ff"}, 2000);
but don't know how to put "h4.pink" in there.. !?
any help much appreciated :)